[PATCH] D19923: [NFC] Run Windows-specific code only on Windows platform

Eugene via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 12:42:51 PDT 2016


kevgs abandoned this revision.

================
Comment at: lib/Target/X86/X86TargetMachine.cpp:43
@@ -41,2 +42,3 @@
   initializeWinEHStatePassPass(PR);
+#endif
 }
----------------
probinson wrote:
> kevgs wrote:
> > probinson wrote:
> > > Isn't this a Windows-target thing?  You've made it a Windows-host thing.
> > I'm building clang on Linux, running like this clang++ foo.cc and this code executes. My thoughts is that clang++ frontend isn't meant to generate Windows code because clang-cl is meant for this puprose.
> > 
> > Should clang++ be able to generate Windows code?
> clang-cl isn't meant to be the only way to produce Windows objects; it is meant to be a drop-in replacement for Microsoft cl.exe, and so *defaults* to producing Windows objects.
> You can certainly specify a Windows target while running on Linux:
> clang++ -target x86_64-pc-win32 foo.cc
> 
> So you don't want to use #ifdef here.  If you can get your hands on the target triple, you could put this under a runtime test.
Ok. That means my patch have no sense. Thanks for your time!


http://reviews.llvm.org/D19923





More information about the llvm-commits mailing list