about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Core/ExecutionState.cpp4
-rw-r--r--lib/Core/Executor.cpp10
-rw-r--r--lib/Core/ExecutorTimers.cpp2
-rw-r--r--lib/Core/Memory.cpp4
-rw-r--r--lib/Core/StatsTracker.cpp4
-rw-r--r--lib/Module/RaiseAsm.cpp4
6 files changed, 16 insertions, 12 deletions
diff --git a/lib/Core/ExecutionState.cpp b/lib/Core/ExecutionState.cpp
index 4362b78f..c6a2cad4 100644
--- a/lib/Core/ExecutionState.cpp
+++ b/lib/Core/ExecutionState.cpp
@@ -315,14 +315,14 @@ void ExecutionState::dumpStack(std::ostream &out) const {
     const InstructionInfo &ii = *target->info;
     out << "\t#" << idx++ 
         << " " << std::setw(8) << std::setfill('0') << ii.assemblyLine
-        << " in " << f->getNameStr() << " (";
+        << " in " << f->getName().str() << " (";
     // Yawn, we could go up and print varargs if we wanted to.
     unsigned index = 0;
     for (Function::arg_iterator ai = f->arg_begin(), ae = f->arg_end();
          ai != ae; ++ai) {
       if (ai!=f->arg_begin()) out << ", ";
 
-      out << ai->getNameStr();
+      out << ai->getName().str();
       // XXX should go through function
       ref<Expr> value = sf.locals[sf.kf->getArgRegister(index++)].value; 
       if (isa<ConstantExpr>(value))
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 87e70a4c..a768ec38 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -449,7 +449,7 @@ void Executor::initializeGlobals(ExecutionState &state) {
     // not defined in this module; if it isn't resolvable then it
     // should be null.
     if (f->hasExternalWeakLinkage() && 
-        !externalDispatcher->resolveSymbol(f->getNameStr())) {
+        !externalDispatcher->resolveSymbol(f->getName())) {
       addr = Expr::createPointer(0);
     } else {
       addr = Expr::createPointer((unsigned long) (void*) f);
@@ -535,7 +535,7 @@ void Executor::initializeGlobals(ExecutionState &state) {
           extern void *__dso_handle __attribute__ ((__weak__));
           addr = &__dso_handle; // wtf ?
         } else {
-          addr = externalDispatcher->resolveSymbol(i->getNameStr());
+          addr = externalDispatcher->resolveSymbol(i->getName());
         }
         if (!addr)
           klee_error("unable to load symbol(%s) while initializing globals.", 
@@ -551,7 +551,7 @@ void Executor::initializeGlobals(ExecutionState &state) {
 
       if (UseAsmAddresses && i->getName()[0]=='\01') {
         char *end;
-        uint64_t address = ::strtoll(i->getNameStr().c_str()+1, &end, 0);
+        uint64_t address = ::strtoll(i->getName().str().c_str()+1, &end, 0);
 
         if (end && *end == '\0') {
           klee_message("NOTE: allocated global at asm specified address: %#08llx"
@@ -2667,7 +2667,7 @@ void Executor::callExternalFunction(ExecutionState &state,
   
   if (NoExternals && !okExternals.count(function->getName())) {
     std::cerr << "KLEE:ERROR: Calling not-OK external function : " 
-               << function->getNameStr() << "\n";
+              << function->getName().str() << "\n";
     terminateStateOnError(state, "externals disallowed", "user.err");
     return;
   }
@@ -2707,7 +2707,7 @@ void Executor::callExternalFunction(ExecutionState &state,
 
   if (!SuppressExternalWarnings) {
     std::ostringstream os;
-    os << "calling external: " << function->getNameStr() << "(";
+    os << "calling external: " << function->getName().str() << "(";
     for (unsigned i=0; i<arguments.size(); i++) {
       os << arguments[i];
       if (i != arguments.size()-1)
diff --git a/lib/Core/ExecutorTimers.cpp b/lib/Core/ExecutorTimers.cpp
index 8934a6cd..2fda5cba 100644
--- a/lib/Core/ExecutorTimers.cpp
+++ b/lib/Core/ExecutorTimers.cpp
@@ -155,7 +155,7 @@ void Executor::processTimers(ExecutionState *current,
           ++next;
           for (ExecutionState::stack_ty::iterator sfIt = es->stack.begin(),
                  sf_ie = es->stack.end(); sfIt != sf_ie; ++sfIt) {
-            *os << "('" << sfIt->kf->function->getNameStr() << "',";
+            *os << "('" << sfIt->kf->function->getName().str() << "',";
             if (next == es->stack.end()) {
               *os << es->prevPC->info->line << "), ";
             } else {
diff --git a/lib/Core/Memory.cpp b/lib/Core/Memory.cpp
index c4228823..d54264a3 100644
--- a/lib/Core/Memory.cpp
+++ b/lib/Core/Memory.cpp
@@ -73,10 +73,10 @@ void MemoryObject::getAllocInfo(std::string &result) const {
   if (allocSite) {
     info << " allocated at ";
     if (const Instruction *i = dyn_cast<Instruction>(allocSite)) {
-      info << i->getParent()->getParent()->getNameStr() << "():";
+      info << i->getParent()->getParent()->getName() << "():";
       info << *i;
     } else if (const GlobalValue *gv = dyn_cast<GlobalValue>(allocSite)) {
-      info << "global:" << gv->getNameStr();
+      info << "global:" << gv->getName();
     } else {
       info << "value:" << *allocSite;
     }
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
index 4906dead..f3eca268 100644
--- a/lib/Core/StatsTracker.cpp
+++ b/lib/Core/StatsTracker.cpp
@@ -480,7 +480,7 @@ void StatsTracker::writeIStats() {
   for (Module::iterator fnIt = m->begin(), fn_ie = m->end(); 
        fnIt != fn_ie; ++fnIt) {
     if (!fnIt->isDeclaration()) {
-      of << "fn=" << fnIt->getNameStr() << "\n";
+      of << "fn=" << fnIt->getName().str() << "\n";
       for (Function::iterator bbIt = fnIt->begin(), bb_ie = fnIt->end(); 
            bbIt != bb_ie; ++bbIt) {
         for (BasicBlock::iterator it = bbIt->begin(), ie = bbIt->end(); 
@@ -513,7 +513,7 @@ void StatsTracker::writeIStats() {
   
                 if (fii.file!="" && fii.file!=sourceFile)
                   of << "cfl=" << fii.file << "\n";
-                of << "cfn=" << f->getNameStr() << "\n";
+                of << "cfn=" << f->getName().str() << "\n";
                 of << "calls=" << csi.count << " ";
                 of << fii.assemblyLine << " ";
                 of << fii.line << "\n";
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp
index 60bf28a1..1f7f756f 100644
--- a/lib/Module/RaiseAsm.cpp
+++ b/lib/Module/RaiseAsm.cpp
@@ -90,7 +90,11 @@ bool RaiseAsmPass::runOnModule(Module &M) {
 
 #if LLVM_VERSION_CODE >= LLVM_VERSION(2, 9)
   std::string Err;
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 1)
+  std::string HostTriple = llvm::sys::getDefaultTargetTriple();
+#else
   std::string HostTriple = llvm::sys::getHostTriple();
+#endif
   const Target *NativeTarget = TargetRegistry::lookupTarget(HostTriple, Err);
   if (NativeTarget == 0) {
     llvm::errs() << "Warning: unable to select native target: " << Err << "\n";