summaryrefslogtreecommitdiff
path: root/lib/CodeGen/StackProtector.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-04-22 02:02:50 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-04-22 02:02:50 +0000
commit8677f2ff9acf317461987b439ede693f01baa5ec (patch)
tree4d054d37f1ba88b1c76c67a7446c5085a0a80b8c /lib/CodeGen/StackProtector.cpp
parent8959c39450b6fd86ba6556b0ccdb8c260f8a93a4 (diff)
downloadllvm-8677f2ff9acf317461987b439ede693f01baa5ec.tar.gz
llvm-8677f2ff9acf317461987b439ede693f01baa5ec.tar.bz2
llvm-8677f2ff9acf317461987b439ede693f01baa5ec.tar.xz
[Modules] Remove potential ODR violations by sinking the DEBUG_TYPE
define below all header includes in the lib/CodeGen/... tree. While the current modules implementation doesn't check for this kind of ODR violation yet, it is likely to grow support for it in the future. It also removes one layer of macro pollution across all the included headers. Other sub-trees will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206837 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/StackProtector.cpp')
-rw-r--r--lib/CodeGen/StackProtector.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/StackProtector.cpp b/lib/CodeGen/StackProtector.cpp
index 1ffd910604..accfe7be18 100644
--- a/lib/CodeGen/StackProtector.cpp
+++ b/lib/CodeGen/StackProtector.cpp
@@ -14,7 +14,6 @@
//
//===----------------------------------------------------------------------===//
-#define DEBUG_TYPE "stack-protector"
#include "llvm/CodeGen/StackProtector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
@@ -37,6 +36,8 @@
#include <cstdlib>
using namespace llvm;
+#define DEBUG_TYPE "stack-protector"
+
STATISTIC(NumFunProtected, "Number of functions protected");
STATISTIC(NumAddrTaken, "Number of local variables that have their address"
" taken.");