]> granicus.if.org Git - clang/commitdiff
Update Clang's CFGBlock interface to conform to the strange part of
authorChandler Carruth <chandlerc@gmail.com>
Thu, 9 Jan 2014 02:56:16 +0000 (02:56 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 9 Jan 2014 02:56:16 +0000 (02:56 +0000)
LLVM's Value interface which is used in LLVM's DominatorTree analysis
and which changed in LLVM r198836.

The DominatorTree analysis is actually a generic graph analysis and
should be moved to LLVM's support library to clarify that Clang and
others are using it with arbitrary graphs. Further, it seems likely that
it should be using something other than printAsOperand, but this is
a simpler build fix. I'll clean this up later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198840 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/Analyses/Dominators.h
include/clang/Analysis/CFG.h

index 2a806c8befda0784d040e1c6ab9150717c2b0ecd..73c38242a260f7729e1caec139ba59ead2afc7a6 100644 (file)
@@ -155,11 +155,6 @@ private:
   CFG *cfg;
 };
 
-inline void WriteAsOperand(raw_ostream &OS, const CFGBlock *BB,
-                          bool t) {
-  OS << "BB#" << BB->getBlockID();
-}
-
 } // end namespace clang
 
 //===-------------------------------------
index 14b7ab842675692c03f3c3380cfbbfba1e221134..f715055f6059300e7ea9d3167640bf578f397ee1 100644 (file)
@@ -25,6 +25,7 @@
 #include "llvm/ADT/PointerIntPair.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Casting.h"
+#include "llvm/Support/raw_ostream.h"
 #include <bitset>
 #include <cassert>
 #include <iterator>
@@ -560,6 +561,9 @@ public:
   void print(raw_ostream &OS, const CFG* cfg, const LangOptions &LO,
              bool ShowColors) const;
   void printTerminator(raw_ostream &OS, const LangOptions &LO) const;
+  void printAsOperand(raw_ostream &OS, bool /*PrintType*/) {
+    OS << "BB#" << getBlockID();
+  }
 
   void addSuccessor(CFGBlock *Block, BumpVectorContext &C) {
     if (Block)