TableGen: allow use of uint64_t for available features mask.
[oota-llvm.git] / lib / IR / LLVMContext.cpp
index 201b278285ccb674260ef64504a553f04ae3c05d..d4ba83dfa622c1483fd2f92dcb824c9e88b0e38f 100644 (file)
@@ -66,6 +66,16 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) {
   unsigned InvariantLdId = getMDKindID("invariant.load");
   assert(InvariantLdId == MD_invariant_load && "invariant.load kind id drifted");
   (void)InvariantLdId;
+
+  // Create the 'alias.scope' metadata kind.
+  unsigned AliasScopeID = getMDKindID("alias.scope");
+  assert(AliasScopeID == MD_alias_scope && "alias.scope kind id drifted");
+  (void)AliasScopeID;
+
+  // Create the 'noalias' metadata kind.
+  unsigned NoAliasID = getMDKindID("noalias");
+  assert(NoAliasID == MD_noalias && "noalias kind id drifted");
+  (void)NoAliasID;
 }
 LLVMContext::~LLVMContext() { delete pImpl; }
 
@@ -164,22 +174,23 @@ void LLVMContext::diagnose(const DiagnosticInfo &DI) {
   }
 
   // Otherwise, print the message with a prefix based on the severity.
-  string_ostream Msg;
-  DiagnosticPrinterRawOStream DP(Msg);
+  std::string MsgStorage;
+  raw_string_ostream Stream(MsgStorage);
+  DiagnosticPrinterRawOStream DP(Stream);
   DI.print(DP);
-
+  Stream.flush();
   switch (DI.getSeverity()) {
   case DS_Error:
-    errs() << "error: " << Msg.str() << "\n";
+    errs() << "error: " << MsgStorage << "\n";
     exit(1);
   case DS_Warning:
-    errs() << "warning: " << Msg.str() << "\n";
+    errs() << "warning: " << MsgStorage << "\n";
     break;
   case DS_Remark:
-    errs() << "remark: " << Msg.str() << "\n";
+    errs() << "remark: " << MsgStorage << "\n";
     break;
   case DS_Note:
-    errs() << "note: " << Msg.str() << "\n";
+    errs() << "note: " << MsgStorage << "\n";
     break;
   }
 }