diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-06-18 07:00:48 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-06-18 07:00:48 +0000 |
commit | f97bd8c9cbebda523df6dfecd32283f23985ee84 (patch) | |
tree | e6c279bbb950570d415c10d335beb47466f0e317 /clang/lib/Parse/ParseDecl.cpp | |
parent | 7b3f322517c2e026d2326e49ecf9bef1edb6e59d (diff) | |
download | bcm5719-llvm-f97bd8c9cbebda523df6dfecd32283f23985ee84.tar.gz bcm5719-llvm-f97bd8c9cbebda523df6dfecd32283f23985ee84.zip |
[MSExtensions] Add support for __forceinline.
__forceinline is a combination of the inline keyword and __attribute__((always_inline))
llvm-svn: 158653
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index f48f9e8c687..ee394f885bc 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -2251,9 +2251,14 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, continue; // Microsoft single token adornments. - case tok::kw___forceinline: - // FIXME: Add handling here! - break; + case tok::kw___forceinline: { + isInvalid = DS.SetFunctionSpecInline(Loc, PrevSpec, DiagID); + IdentifierInfo *AttrName = Tok.getIdentifierInfo(); + SourceLocation AttrNameLoc = ConsumeToken(); + DS.getAttributes().addNew(AttrName, AttrNameLoc, 0, AttrNameLoc, 0, + SourceLocation(), 0, 0); + continue; + } case tok::kw___ptr64: case tok::kw___ptr32: |