aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Module
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Module')
-rw-r--r--lib/Module/InstructionInfoTable.cpp4
-rw-r--r--lib/Module/ModuleUtil.cpp11
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/Module/InstructionInfoTable.cpp b/lib/Module/InstructionInfoTable.cpp
index fde5ff19..05a1f7b9 100644
--- a/lib/Module/InstructionInfoTable.cpp
+++ b/lib/Module/InstructionInfoTable.cpp
@@ -120,7 +120,7 @@ public:
if (dsub != nullptr) {
auto path = dsub->getFilename();
return std::make_unique<FunctionInfo>(FunctionInfo(
- 0, getInternedString(path), dsub->getLine(), asmLine));
+ 0, getInternedString(path.str()), dsub->getLine(), asmLine));
}
// Fallback: Mark as unknown
@@ -151,7 +151,7 @@ public:
}
}
return std::make_unique<InstructionInfo>(InstructionInfo(
- 0, getInternedString(full_path), line, column, asmLine));
+ 0, getInternedString(full_path.str()), line, column, asmLine));
}
if (f != nullptr)
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
index 2316ef45..7cd66415 100644
--- a/lib/Module/ModuleUtil.cpp
+++ b/lib/Module/ModuleUtil.cpp
@@ -82,11 +82,11 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
for (auto const &Function : *M) {
if (Function.hasName()) {
if (Function.isDeclaration())
- UndefinedSymbols.insert(Function.getName());
+ UndefinedSymbols.insert(Function.getName().str());
else if (!Function.hasLocalLinkage()) {
assert(!Function.hasDLLImportStorageClass() &&
"Found dllimported non-external symbol!");
- DefinedSymbols.insert(Function.getName());
+ DefinedSymbols.insert(Function.getName().str());
}
}
}
@@ -95,18 +95,17 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
I != E; ++I)
if (I->hasName()) {
if (I->isDeclaration())
- UndefinedSymbols.insert(I->getName());
+ UndefinedSymbols.insert(I->getName().str());
else if (!I->hasLocalLinkage()) {
assert(!I->hasDLLImportStorageClass() && "Found dllimported non-external symbol!");
- DefinedSymbols.insert(I->getName());
+ DefinedSymbols.insert(I->getName().str());
}
}
for (Module::const_alias_iterator I = M->alias_begin(), E = M->alias_end();
I != E; ++I)
if (I->hasName())
- DefinedSymbols.insert(I->getName());
-
+ DefinedSymbols.insert(I->getName().str());
// Prune out any defined symbols from the undefined symbols set
// and other symbols we don't want to treat as an undefined symbol