[llvm-branch-commits] [cfe-branch] r261158 - Merging r259874:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 17 13:28:41 PST 2016
Author: hans
Date: Wed Feb 17 15:28:41 2016
New Revision: 261158
URL: http://llvm.org/viewvc/llvm-project?rev=261158&view=rev
Log:
Merging r259874:
------------------------------------------------------------------------
r259874 | compnerd | 2016-02-04 20:12:40 -0800 (Thu, 04 Feb 2016) | 8 lines
CodeGen: correct Windows ARM C++ assertion
Because the Decl is explicitly passed as nullptr further up the call chain, it
is possible to invoke isa on a nullptr, which will assert. Guard against the
nullptr.
Take the opportunity to reuse the helper method rather than re-implementing this
logic.
------------------------------------------------------------------------
Added:
cfe/branches/release_38/test/CodeGenCXX/windows-on-arm-stack-probe-size.cpp
- copied unchanged from r259874, cfe/trunk/test/CodeGenCXX/windows-on-arm-stack-probe-size.cpp
Modified:
cfe/branches/release_38/ (props changed)
cfe/branches/release_38/lib/CodeGen/TargetInfo.cpp
Propchange: cfe/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 17 15:28:41 2016
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:257652,257695,257710,257831,257838,257853,257861,257869-257871,257947,258110,258396,259183,259260,259598,259931,260370,260616,260637,260851
+/cfe/trunk:257652,257695,257710,257831,257838,257853,257861,257869-257871,257947,258110,258396,259183,259260,259598,259874,259931,260370,260616,260637,260851
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_38/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_38/lib/CodeGen/TargetInfo.cpp?rev=261158&r1=261157&r2=261158&view=diff
==============================================================================
--- cfe/branches/release_38/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/branches/release_38/lib/CodeGen/TargetInfo.cpp Wed Feb 17 15:28:41 2016
@@ -4868,9 +4868,6 @@ public:
};
class WindowsARMTargetCodeGenInfo : public ARMTargetCodeGenInfo {
- void addStackProbeSizeTargetAttribute(const Decl *D, llvm::GlobalValue *GV,
- CodeGen::CodeGenModule &CGM) const;
-
public:
WindowsARMTargetCodeGenInfo(CodeGenTypes &CGT, ARMABIInfo::ABIKind K)
: ARMTargetCodeGenInfo(CGT, K) {}
@@ -4879,18 +4876,6 @@ public:
CodeGen::CodeGenModule &CGM) const override;
};
-void WindowsARMTargetCodeGenInfo::addStackProbeSizeTargetAttribute(
- const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const {
- if (!isa<FunctionDecl>(D))
- return;
- if (CGM.getCodeGenOpts().StackProbeSize == 4096)
- return;
-
- llvm::Function *F = cast<llvm::Function>(GV);
- F->addFnAttr("stack-probe-size",
- llvm::utostr(CGM.getCodeGenOpts().StackProbeSize));
-}
-
void WindowsARMTargetCodeGenInfo::setTargetAttributes(
const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const {
ARMTargetCodeGenInfo::setTargetAttributes(D, GV, CGM);
More information about the llvm-branch-commits
mailing list