rnk requested changes to this revision.
rnk added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/Driver/ToolChain.cpp:450-458
+  const llvm::Target *TT = llvm::TargetRegistry::lookupTarget(TS, Error);
+  if (!TT)
+    return llvm::ExceptionHandling::None;
+  std::unique_ptr<llvm::MCRegisterInfo> MRI(TT->createMCRegInfo(TS));
+  if (!MRI)
+    return llvm::ExceptionHandling::None;
+  std::unique_ptr<llvm::MCAsmInfo> MAI(TT->createMCAsmInfo(*MRI, TS));
----------------
I think this is problematic because Clang is supposed to be able to generate 
LLVM IR for targets that are not registered. With this change, we have silent 
behavior difference between clang with LLVM backend and clang without LLVM 
backends.

Building clang without a single backend is pretty silly, but our test suite 
frequently generates IR for targets that are not compiled in. Some of the tests 
you've written will probably fail on buildbots configured this way.


Repository:
  rL LLVM

https://reviews.llvm.org/D39673



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to