[LLVMdev] Noop in sys::getDefaultTargetTriple()? (original) (raw)

Kamil Rytarowski n54 at gmx.com
Wed Feb 11 19:14:41 PST 2015


Hello,

I was looking at sys::getDefaultTargetTriple() (file: lib/Support/Unix/Host.inc ) and there is something unclear to me.

std::string sys::getDefaultTargetTriple() { StringRef TargetTripleString(LLVM_DEFAULT_TARGET_TRIPLE); std::pair<StringRef, StringRef> ArchSplit = TargetTripleString.split('-');

// Normalize the arch, since the target triple may not actually match the // target. std::string Arch = ArchSplit.first;

std::string Triple(Arch); Triple += '-'; Triple += ArchSplit.second; [...]

Does content of Tripe = TargetTripleString? Of course with the difference of the container type.

Do I miss something?



More information about the llvm-dev mailing list