Add SymbolRef::print() and have SymbolicRegion::print() use this method instead of calling SymbolRef::getNumber().
llvm-svn: 60578
This commit is contained in:
parent
3cb81db1b2
commit
c9e7622a52
|
|
@ -22,6 +22,10 @@
|
|||
#include "llvm/Support/DataTypes.h"
|
||||
#include "llvm/Support/Allocator.h"
|
||||
|
||||
namespace llvm {
|
||||
class raw_ostream;
|
||||
}
|
||||
|
||||
namespace clang {
|
||||
|
||||
class MemRegion;
|
||||
|
|
@ -37,6 +41,8 @@ public:
|
|||
operator unsigned() const { return getNumber(); }
|
||||
unsigned getNumber() const { assert (isInitialized()); return Data; }
|
||||
|
||||
void print(llvm::raw_ostream& os) const;
|
||||
|
||||
void Profile(llvm::FoldingSetNodeID& ID) const {
|
||||
assert (isInitialized());
|
||||
ID.AddInteger(Data);
|
||||
|
|
|
|||
|
|
@ -149,7 +149,8 @@ void VarRegion::print(llvm::raw_ostream& os) const {
|
|||
}
|
||||
|
||||
void SymbolicRegion::print(llvm::raw_ostream& os) const {
|
||||
os << "$" << sym.getNumber();
|
||||
os << "SymRegion-";
|
||||
sym.print(os);
|
||||
}
|
||||
|
||||
void FieldRegion::print(llvm::raw_ostream& os) const {
|
||||
|
|
|
|||
|
|
@ -13,9 +13,14 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "clang/Analysis/PathSensitive/SymbolManager.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
using namespace clang;
|
||||
|
||||
void SymbolRef::print(llvm::raw_ostream& os) const {
|
||||
os << getNumber();
|
||||
}
|
||||
|
||||
SymbolRef SymbolManager::getSymbol(VarDecl* D) {
|
||||
|
||||
assert (isa<ParmVarDecl>(D) || isa<ImplicitParamDecl>(D) ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue