aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-22 19:21:44 +0000
committerChris Lattner <sabre@nondot.org>2009-01-22 19:21:44 +0000
commit53ebff34243161e5b18cbec5e3373661ab105d2d (patch)
tree1af92fda063df4e67e3fb3490526715e4142f7a2 /lib/Sema/Sema.cpp
parentf536ca311af4ca68df94fa6597790a354ccfbb01 (diff)
inline Sema::getLangOptions, rdar://6515190. This speeds up
fsyntax-only with PTH by 3%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index a8cc404907..7e61bbd14c 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -114,7 +114,8 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) {
}
Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer)
- : PP(pp), Context(ctxt), Consumer(consumer), Diags(PP.getDiagnostics()),
+ : LangOpts(pp.getLangOptions()), PP(pp), Context(ctxt), Consumer(consumer),
+ Diags(PP.getDiagnostics()),
SourceMgr(PP.getSourceManager()), CurContext(0), PreDeclaratorDC(0),
CurBlock(0), PackContext(0), IdResolver(pp.getLangOptions()),
GlobalNewDeleteDeclared(false) {
@@ -197,10 +198,6 @@ void Sema::ActOnEndOfTranslationUnit() {
// Helper functions.
//===----------------------------------------------------------------------===//
-const LangOptions &Sema::getLangOptions() const {
- return PP.getLangOptions();
-}
-
/// getCurFunctionDecl - If inside of a function body, this returns a pointer
/// to the function decl for the function being parsed. If we're currently
/// in a 'block', this returns the containing context.