r178107 - [PCH/modules] Remove HiddenName::MacroUndef
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Mar 26 18:25:29 PDT 2013
Author: akirtzidis
Date: Tue Mar 26 20:25:28 2013
New Revision: 178107
URL: http://llvm.org/viewvc/llvm-project?rev=178107&view=rev
Log:
[PCH/modules] Remove HiddenName::MacroUndef
Modified:
cfe/trunk/include/clang/Serialization/ASTReader.h
cfe/trunk/lib/Serialization/ASTReader.cpp
Modified: cfe/trunk/include/clang/Serialization/ASTReader.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTReader.h?rev=178107&r1=178106&r2=178107&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/ASTReader.h (original)
+++ cfe/trunk/include/clang/Serialization/ASTReader.h Tue Mar 26 20:25:28 2013
@@ -458,13 +458,10 @@ private:
public:
enum NameKind {
Declaration,
- MacroVisibility,
- MacroUndef
+ MacroVisibility
} Kind;
private:
- unsigned Loc;
-
union {
Decl *D;
MacroDirective *MD;
@@ -473,13 +470,10 @@ private:
IdentifierInfo *Id;
public:
- HiddenName(Decl *D) : Kind(Declaration), Loc(), D(D), Id() { }
+ HiddenName(Decl *D) : Kind(Declaration), D(D), Id() { }
HiddenName(IdentifierInfo *II, MacroDirective *MD)
- : Kind(MacroVisibility), Loc(), MD(MD), Id(II) { }
-
- HiddenName(IdentifierInfo *II, MacroDirective *MD, SourceLocation Loc)
- : Kind(MacroUndef), Loc(Loc.getRawEncoding()), MD(MD), Id(II) { }
+ : Kind(MacroVisibility), MD(MD), Id(II) { }
NameKind getKind() const { return Kind; }
@@ -489,15 +483,9 @@ private:
}
std::pair<IdentifierInfo *, MacroDirective *> getMacro() const {
- assert((getKind() == MacroUndef || getKind() == MacroVisibility)
- && "Hidden name is not a macro!");
+ assert(getKind() == MacroVisibility && "Hidden name is not a macro!");
return std::make_pair(Id, MD);
}
-
- SourceLocation getMacroUndefLoc() const {
- assert(getKind() == MacroUndef && "Hidden name is not an undef!");
- return SourceLocation::getFromRawEncoding(Loc);
- }
};
/// \brief A set of hidden declarations.
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=178107&r1=178106&r2=178107&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Tue Mar 26 20:25:28 2013
@@ -2738,11 +2738,6 @@ void ASTReader::makeNamesVisible(const H
installImportedMacro(Macro.first, Macro.second);
break;
}
-
- case HiddenName::MacroUndef: {
- // FIXME: Remove HiddenName::MacroUndef.
- break;
- }
}
}
}
More information about the cfe-commits
mailing list