diff options
Diffstat (limited to 'llvm/lib/CodeGen/ShadowStackGCLowering.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/ShadowStackGCLowering.cpp | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/ShadowStackGCLowering.cpp b/llvm/lib/CodeGen/ShadowStackGCLowering.cpp index 38f658084294..d4840d117110 100644 --- a/llvm/lib/CodeGen/ShadowStackGCLowering.cpp +++ b/llvm/lib/CodeGen/ShadowStackGCLowering.cpp @@ -115,7 +115,7 @@ Constant *ShadowStackGCLowering::GetFrameMap(Function &F) {      Constant *C = cast<Constant>(Roots[I].first->getArgOperand(1));      if (!C->isNullValue())        NumMeta = I + 1; -    Metadata.push_back(ConstantExpr::getBitCast(C, VoidPtr)); +    Metadata.push_back(C);    }    Metadata.resize(NumMeta); @@ -173,7 +173,7 @@ Type *ShadowStackGCLowering::GetConcreteStackEntryType(Function &F) {  bool ShadowStackGCLowering::doInitialization(Module &M) {    bool Active = false;    for (Function &F : M) { -    if (F.hasGC() && F.getGC() == std::string("shadow-stack")) { +    if (F.hasGC() && F.getGC() == "shadow-stack") {        Active = true;        break;      } @@ -292,8 +292,7 @@ void ShadowStackGCLowering::getAnalysisUsage(AnalysisUsage &AU) const {  /// runOnFunction - Insert code to maintain the shadow stack.  bool ShadowStackGCLowering::runOnFunction(Function &F) {    // Quick exit for functions that do not use the shadow stack GC. -  if (!F.hasGC() || -      F.getGC() != std::string("shadow-stack")) +  if (!F.hasGC() || F.getGC() != "shadow-stack")      return false;    LLVMContext &Context = F.getContext();  | 
