Make const the argument of getDefinition.

llvm-svn: 160226
This commit is contained in:
Rafael Espindola 2012-07-15 01:05:36 +00:00
parent 11d08bd931
commit a5bba70c9c
1 changed files with 4 additions and 4 deletions

View File

@ -1754,12 +1754,12 @@ bool Sema::mergeDeclAttribute(Decl *D, InheritableAttr *Attr) {
return false;
}
static const Decl *getDefinition(Decl *D) {
if (TagDecl *TD = dyn_cast<TagDecl>(D))
static const Decl *getDefinition(const Decl *D) {
if (const TagDecl *TD = dyn_cast<TagDecl>(D))
return TD->getDefinition();
if (VarDecl *VD = dyn_cast<VarDecl>(D))
if (const VarDecl *VD = dyn_cast<VarDecl>(D))
return VD->getDefinition();
if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
const FunctionDecl* Def;
if (FD->hasBody(Def))
return Def;