aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DeadStores.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DeadStores.cpp')
-rw-r--r--lib/Analysis/DeadStores.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Analysis/DeadStores.cpp b/lib/Analysis/DeadStores.cpp
index e64214e694..0f869dcf6b 100644
--- a/lib/Analysis/DeadStores.cpp
+++ b/lib/Analysis/DeadStores.cpp
@@ -39,6 +39,10 @@ public:
const LiveVariables::AnalysisDataTy& AD,
const LiveVariables::ValTy& Live) {
+ // Skip statements in macros.
+ if (S->getLocStart().isMacroID())
+ return;
+
if (BinaryOperator* B = dyn_cast<BinaryOperator>(S)) {
if (!B->isAssignmentOp()) return; // Skip non-assignments.