projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ARM] Enable DP copy, load and store instructions for FPv4-SP
[oota-llvm.git]
/
lib
/
CodeGen
/
ShadowStackGC.cpp
diff --git
a/lib/CodeGen/ShadowStackGC.cpp
b/lib/CodeGen/ShadowStackGC.cpp
index 55c6cfc1e6f486ff4137a3d78626a573da0368d3..f7c64dac61246ed0d58957d8493c25a6bfc4d9bd 100644
(file)
--- a/
lib/CodeGen/ShadowStackGC.cpp
+++ b/
lib/CodeGen/ShadowStackGC.cpp
@@
-25,7
+25,6
@@
//
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
-#define DEBUG_TYPE "shadowstackgc"
#include "llvm/CodeGen/GCs.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/CodeGen/GCs.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/GCStrategy.h"
@@
-36,6
+35,8
@@
using namespace llvm;
using namespace llvm;
+#define DEBUG_TYPE "shadowstackgc"
+
namespace {
class ShadowStackGC : public GCStrategy {
namespace {
class ShadowStackGC : public GCStrategy {
@@
-55,8
+56,8
@@
namespace {
public:
ShadowStackGC();
public:
ShadowStackGC();
- bool initializeCustomLowering(Module &M);
- bool performCustomLowering(Function &F);
+ bool initializeCustomLowering(Module &M)
override
;
+ bool performCustomLowering(Function &F)
override
;
private:
bool IsNullValue(Value *V);
private:
bool IsNullValue(Value *V);
@@
-101,7
+102,7
@@
namespace {
IRBuilder<> *Next() {
switch (State) {
default:
IRBuilder<> *Next() {
switch (State) {
default:
- return
0
;
+ return
nullptr
;
case 0:
StateBB = F.begin();
case 0:
StateBB = F.begin();
@@
-137,7
+138,7
@@
namespace {
Calls.push_back(CI);
if (Calls.empty())
Calls.push_back(CI);
if (Calls.empty())
- return
0
;
+ return
nullptr
;
// Create a cleanup block.
LLVMContext &C = F.getContext();
// Create a cleanup block.
LLVMContext &C = F.getContext();
@@
-194,7
+195,7
@@
namespace {
void llvm::linkShadowStackGC() { }
void llvm::linkShadowStackGC() { }
-ShadowStackGC::ShadowStackGC() : Head(
0), StackEntryTy(0
) {
+ShadowStackGC::ShadowStackGC() : Head(
nullptr), StackEntryTy(nullptr
) {
InitRoots = true;
CustomRoots = true;
}
InitRoots = true;
CustomRoots = true;
}
@@
-390,8
+391,8
@@
bool ShadowStackGC::performCustomLowering(Function &F) {
BasicBlock::iterator IP = F.getEntryBlock().begin();
IRBuilder<> AtEntry(IP->getParent(), IP);
BasicBlock::iterator IP = F.getEntryBlock().begin();
IRBuilder<> AtEntry(IP->getParent(), IP);
- Instruction *StackEntry
= AtEntry.CreateAlloca(ConcreteStackEntryTy, 0
,
-
"gc_frame");
+ Instruction *StackEntry
= AtEntry.CreateAlloca(ConcreteStackEntryTy, nullptr
,
+ "gc_frame");
while (isa<AllocaInst>(IP)) ++IP;
AtEntry.SetInsertPoint(IP->getParent(), IP);
while (isa<AllocaInst>(IP)) ++IP;
AtEntry.SetInsertPoint(IP->getParent(), IP);