Attempt to unbreak behavior caused by D44491 resulting in inability to build standalone/unbridged CoreFoundation on an ELF target with -fconstant-cfstrings as the cast<> expression would fail when attempting to use the builtin since the faux-ObjectiveC class backing CFSTR constant strings is an llvm::Constant being cast to an llvm::GlobalValue. This only affects ELF targets, PE/COFF targets will still follow the same path so this should not affect them and takes an approach more in-line with how Apple toolchains behave.
I will add a lit test for Clang codegen shortly after I figure out how to get it to work correctly, though with said patch I'm able to build standalone CoreFoundation with constant CFStrings without it being bridged against Foundation or Swift runtimes (as far as I know that was previously only supported on Windows).
Trying to make a similar test to cfstring-windows.c but still trying to get the hang of FileCheck.
******************** Testing Time: 10.56s ******************** Failing Tests (1): Clang :: CodeGen/cfstring-linux-unbridged.c