[llvm-commits] [llvm] r139233 - /llvm/trunk/lib/Target/X86/X86Subtarget.cpp
Rafael Espindola
rafael.espindola at gmail.com
Wed Sep 7 09:10:57 PDT 2011
Author: rafael
Date: Wed Sep 7 11:10:57 2011
New Revision: 139233
URL: http://llvm.org/viewvc/llvm-project?rev=139233&view=rev
Log:
Detect attempt to use segmented stacks on non ELF systems and error
(not assert) early.
Modified:
llvm/trunk/lib/Target/X86/X86Subtarget.cpp
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=139233&r1=139232&r2=139233&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Wed Sep 7 11:10:57 2011
@@ -16,9 +16,11 @@
#include "X86InstrInfo.h"
#include "llvm/GlobalValue.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Host.h"
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetOptions.h"
#include "llvm/ADT/SmallVector.h"
#define GET_SUBTARGETINFO_TARGET_DESC
@@ -321,6 +323,9 @@
assert((!In64BitMode || HasX86_64) &&
"64-bit code requested on a subtarget that doesn't support it!");
+ if(EnableSegmentedStacks && !isTargetELF())
+ report_fatal_error("Segmented stacks are only implemented on ELF.");
+
// Stack alignment is 16 bytes on Darwin, FreeBSD, Linux and Solaris (both
// 32 and 64 bit) and for all 64-bit targets.
if (StackAlignOverride)
More information about the llvm-commits
mailing list