One side of the led is directly attached to the power supply. As an example, lets say the positive side of the led is directly attached to +.
This means the other side of the led is switched to GND (led on) or not switched at all (led off) or left "floating", wich is not an acceptable state for a cmos
The circuit below solves this. When the 'signal' is switched to GND the transistor will do nothing and its output (C) is pulled high trough R1
When 'signal' is left floating, the transistor input will be pulled high by R3 and the transistor will switch GND to the output
Now you have eighter V+ at the output when the led is on, or GND when it is off;
When the signal may be inverted (V+ when off, GND when on) remove the transistor and R1