r213893 - Use ELF in the clang-interpreter on windows.

Rafael Espindola rafael.espindola at gmail.com
Thu Jul 24 13:47:42 PDT 2014


Author: rafael
Date: Thu Jul 24 15:47:42 2014
New Revision: 213893

URL: http://llvm.org/viewvc/llvm-project?rev=213893&view=rev
Log:
Use ELF in the clang-interpreter on windows.

We don't support loading COFF files yet.

Modified:
    cfe/trunk/examples/clang-interpreter/main.cpp

Modified: cfe/trunk/examples/clang-interpreter/main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/main.cpp?rev=213893&r1=213892&r2=213893&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/main.cpp (original)
+++ cfe/trunk/examples/clang-interpreter/main.cpp Thu Jul 24 15:47:42 2014
@@ -85,7 +85,14 @@ int main(int argc, const char **argv, ch
 
   IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
   DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient);
-  Driver TheDriver(Path, llvm::sys::getProcessTriple(), Diags);
+
+  // Use ELF on windows for now.
+  std::string TripleStr = llvm::sys::getProcessTriple();
+  llvm::Triple T(TripleStr);
+  if (T.isOSBinFormatCOFF())
+    T.setObjectFormat(llvm::Triple::ELF);
+
+  Driver TheDriver(Path, T.str(), Diags);
   TheDriver.setTitle("clang interpreter");
   TheDriver.setCheckInputsExist(false);
 





More information about the cfe-commits mailing list