diff options
| author | John McCall <rjmccall@apple.com> | 2009-10-23 21:14:09 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2009-10-23 21:14:09 +0000 |
| commit | 3665e00c87ba3f69f731e5254140ec4cd36807a9 (patch) | |
| tree | 388fbb46d930618f824277324776fb00a1ccb570 /clang/lib/AST | |
| parent | 8acf2956b8b47596103517e024acc8e686c17353 (diff) | |
| download | bcm5719-llvm-3665e00c87ba3f69f731e5254140ec4cd36807a9.tar.gz bcm5719-llvm-3665e00c87ba3f69f731e5254140ec4cd36807a9.zip | |
Add ASTContext::getTrivialDeclaratorInfo, which initializes a new
source info block with a single location.
llvm-svn: 84970
Diffstat (limited to 'clang/lib/AST')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 7f5fa35842a..3ece8c95a27 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -955,6 +955,13 @@ DeclaratorInfo *ASTContext::CreateDeclaratorInfo(QualType T, return DInfo; } +DeclaratorInfo *ASTContext::getTrivialDeclaratorInfo(QualType T, + SourceLocation L) { + DeclaratorInfo *DI = CreateDeclaratorInfo(T); + DI->getTypeLoc().initialize(L); + return DI; +} + /// getInterfaceLayoutImpl - Get or compute information about the /// layout of the given interface. /// |

