[MCJIT] Make sure eh-frame fixups use the target's pointer type, not the host's.
[oota-llvm.git] / lib / Analysis / Lint.cpp
index 806a1fdee5bdbbec7e83481c758ddeb8c222706c..eebe6b3e56b4acd38faecabbde3389962b430a54 100644 (file)
@@ -96,7 +96,7 @@ namespace {
 
     Value *findValue(Value *V, bool OffsetOk) const;
     Value *findValueImpl(Value *V, bool OffsetOk,
-                         SmallPtrSet<Value *, 4> &Visited) const;
+                         SmallPtrSetImpl<Value *> &Visited) const;
 
   public:
     Module *Mod;
@@ -105,10 +105,11 @@ namespace {
     const DataLayout *DL;
     TargetLibraryInfo *TLI;
 
-    string_ostream MessagesStr;
+    std::string Messages;
+    raw_string_ostream MessagesStr;
 
     static char ID; // Pass identification, replacement for typeid
-    Lint() : FunctionPass(ID) {
+    Lint() : FunctionPass(ID), MessagesStr(Messages) {
       initializeLintPass(*PassRegistry::getPassRegistry());
     }
 
@@ -180,7 +181,7 @@ bool Lint::runOnFunction(Function &F) {
   TLI = &getAnalysis<TargetLibraryInfo>();
   visit(F);
   dbgs() << MessagesStr.str();
-  MessagesStr.clear();
+  Messages.clear();
   return false;
 }
 
@@ -621,7 +622,7 @@ Value *Lint::findValue(Value *V, bool OffsetOk) const {
 
 /// findValueImpl - Implementation helper for findValue.
 Value *Lint::findValueImpl(Value *V, bool OffsetOk,
-                           SmallPtrSet<Value *, 4> &Visited) const {
+                           SmallPtrSetImpl<Value *> &Visited) const {
   // Detect self-referential values.
   if (!Visited.insert(V))
     return UndefValue::get(V->getType());