forked from GPUOpen-Drivers/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manually merged master:237625757a1 into amd-gfx:dc1257ed3f4
Local branch amd-gfx dc1257e Manually merged master:1d104f75498 into amd-gfx:c625fb9f60f Remote branch master 2376257 [SystemZ] Bugfix for backchain with packed-stack Change-Id: I079cf4e395ed6ab5e7bcb5a0bb9d2539f17c7513
- Loading branch information
Showing
307 changed files
with
9,151 additions
and
3,279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//===--- CollectMacros.cpp ---------------------------------------*- C++-*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "CollectMacros.h" | ||
#include "clang/Basic/SourceLocation.h" | ||
#include "clang/Lex/Lexer.h" | ||
|
||
namespace clang { | ||
namespace clangd { | ||
|
||
void CollectMainFileMacros::add(const Token &MacroNameTok, | ||
const MacroInfo *MI) { | ||
if (!InMainFile) | ||
return; | ||
auto Loc = MacroNameTok.getLocation(); | ||
if (Loc.isInvalid() || Loc.isMacroID()) | ||
return; | ||
|
||
auto Name = MacroNameTok.getIdentifierInfo()->getName(); | ||
Out.Names.insert(Name); | ||
auto Range = halfOpenToRange( | ||
SM, CharSourceRange::getCharRange(Loc, MacroNameTok.getEndLoc())); | ||
if (auto SID = getSymbolID(Name, MI, SM)) | ||
Out.MacroRefs[*SID].push_back(Range); | ||
else | ||
Out.UnknownMacros.push_back(Range); | ||
} | ||
} // namespace clangd | ||
} // namespace clang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.