move getNameWithPrefix and getSymbol to TargetMachine.
TargetLoweringBase is implemented in CodeGen, so before this patch we had
a dependency fom Target to CodeGen. This would show up as a link failure of
llvm-stress when building with -DBUILD_SHARED_LIBS=ON.
This fixes pr18900.
llvm-svn: 201711
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index 86b67ef..fb20806 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -391,7 +391,7 @@
// string is owned by _defines
SmallString<64> Buffer;
- _target->getTargetLowering()->getNameWithPrefix(Buffer, def, _mangler);
+ _target->getNameWithPrefix(Buffer, def, _mangler);
// set alignment part log2() can have rounding errors
uint32_t align = def->getAlignment();
@@ -527,7 +527,7 @@
return;
SmallString<64> name;
- _target->getTargetLowering()->getNameWithPrefix(name, decl, _mangler);
+ _target->getNameWithPrefix(name, decl, _mangler);
StringMap<NameAndAttributes>::value_type &entry =
_undefines.GetOrCreateValue(name);