Correct this error message, and most importantly make it distinct from the
authorNick Lewycky <nicholas@mxc.ca>
Sun, 10 Mar 2013 22:01:44 +0000 (22:01 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sun, 10 Mar 2013 22:01:44 +0000 (22:01 +0000)
error above. Based on a patch by Peter Zotov!

llvm-svn: 176794

llvm/lib/Target/TargetMachineC.cpp

index 1e4c195..79f74bd 100644 (file)
@@ -184,7 +184,7 @@ LLVMBool LLVMTargetMachineEmitToFile(LLVMTargetMachineRef T, LLVMModuleRef M,
   }
 
   if (TM->addPassesToEmitFile(pass, destf, ft)) {
-    error = "No DataLayout in TargetMachine";
+    error = "TargetMachine can't emit a file of this type";
     *ErrorMessage = strdup(error.c_str());
     return true;
   }