Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3a84aef
[PowerPC][NFC] auto gen checks vec rounding tests (#166435)
lei137 Nov 5, 2025
9762ab0
[MLIR][NVVM] Fix the lowering of mbarrier.test.wait (#166555)
durga4github Nov 5, 2025
338fb02
[BOLT][NFC] Rename funtions with _negative suffix to _unknown when th…
ElvinaYakubova Nov 5, 2025
87fb7b0
[flang] Adding NOTIFY specifier in image selector and add notify type…
JDPailleux Nov 5, 2025
52cb6e9
[ProfCheck][NFC] Make Function argument from branch weight setter opt…
mtrofin Nov 5, 2025
4334b43
[gn] port bb4ed55acdbc
nico Nov 5, 2025
fa6cc7e
[Clang] FunctionEffects: ignore (methods of) local CXXRecordDecls. (#…
dougsonos Nov 5, 2025
d568601
[NFC][TableGen] Adopt NamespaceEmitter in DirectiveEmitter (#165600)
jurahul Nov 5, 2025
3641e26
[MsDemangle] Read entire chain of target names in special tables (#15…
Nerixyz Nov 5, 2025
ff108f7
Fix failures introduced in #166032 (#166574)
mtrofin Nov 5, 2025
a796d18
[gn build] Port 370058777be2
llvmgnsyncbot Nov 5, 2025
ef6947b
[gn build] Port 3ebed51e997b
llvmgnsyncbot Nov 5, 2025
9bb67f8
[gn build] Port 51d0f6d6e172
llvmgnsyncbot Nov 5, 2025
3bf0ce1
[gn build] Port 718a3b268fcf
llvmgnsyncbot Nov 5, 2025
ce5dac6
[gn build] Port dd14eb8242d7
llvmgnsyncbot Nov 5, 2025
bb367c1
[polly] Fix unused variable warnings
kazutakahirata Nov 5, 2025
0b5a00a
[CI][NFC] Reformat Python Files in .ci directory
boomanaiden154 Nov 5, 2025
99334f7
[ADT] Add static_assert to llvm::to_address for function types (#166505)
kazutakahirata Nov 5, 2025
ab02808
[Support] Simplify minIntN and isUIntN (NFC) (#166506)
kazutakahirata Nov 5, 2025
0b29c3c
[Hexagon] Remove redundant declarations (NFC) (#166507)
kazutakahirata Nov 5, 2025
aea75d0
[ObjectYAML] Remove redundant declarations (NFC) (#166508)
kazutakahirata Nov 5, 2025
d7c1df3
[llvm] Proofread GoldPlugin.rst (#166509)
kazutakahirata Nov 5, 2025
6fec104
[AMDGPU] Enable typechecks for __builtin_amdgcn_raw_ptr_buffer_atomic…
jmmartinez Nov 5, 2025
3154a84
[AMDGPU] Autogenerate R600 packetizer checks (#166570)
jayfoad Nov 5, 2025
d4e3a23
[clang] [doc] Document that the ms_abi attribute works on aarch64 too…
mstorsjo Nov 5, 2025
95c8750
[AArch64][GlobalISel] Added pmull/pmull64 intrinsic support (#165740)
JoshdRod Nov 5, 2025
0b72899
[libc][math] Refactor the `math_errhandling` macro definition (#166350)
vhscampos Nov 5, 2025
9b1719e
[lldb] Mark single-argument SourceLanguage constructors explicit (#16…
Michael137 Nov 5, 2025
056d2c1
RuntimeLibcalls: Split lowering decisions into LibcallLoweringInfo (#…
arsenm Nov 5, 2025
dd88923
RuntimeLibcalls: Remove LibcallLoweringPredicate from RuntimeLibcallI…
arsenm Nov 5, 2025
6312d27
[DirectX] Emit `hlsl.wavesize` function attribute as entry property m…
inbelic Nov 5, 2025
a1f0fe1
[MsDemangle] Use NodeList over SmallVector for target names (#166586)
Nerixyz Nov 5, 2025
9564b26
[lldb] Support a Stable ABI LLDB_PYTHON_EXT_SUFFIX (#166269)
JDevlieghere Nov 5, 2025
f60e693
[llvm] Emit canonical linkage correct function symbol (#166487)
Prabhuk Nov 5, 2025
cb41408
[Xtensa] Fix S32C1I instruction encoding and copyPhysReg. (#165174)
andreisfr Nov 5, 2025
efa7ab0
[profcheck] Add unknown branch weights to expanded cmpxchg loop. (#16…
jinhuang1102 Nov 5, 2025
d49c670
[libcxxabi][demangle] Fix the cp-to-llvm.sh sync script to copy all h…
Michael137 Nov 5, 2025
3c162ba
[LLDB][NativePDB] Add non-overlapping fields in root struct (#166243)
Nerixyz Nov 5, 2025
af0b6b1
[ProfCheck][NFC] fix argument order for call to setExplicitlyUnknownB…
tgymnich Nov 5, 2025
ebeb36b
[PowerPC] Implement vsx rotate left word instr (#160754)
lei137 Nov 5, 2025
d3caae1
[clang] Refactor clang's keyword enable/disable mechanism to allow ll…
dsandersllvm Nov 5, 2025
bc55f4f
[debugserver] Fix debugserver build on < macOS 10.15 (#166599)
JDevlieghere Nov 5, 2025
c193eea
[gn build] Port 056d2c12f756
llvmgnsyncbot Nov 5, 2025
120689e
[libc] Migrate ctype_utils to use char instead of int where applicabl…
vonosmas Nov 5, 2025
e7f7973
[libc] Migrate wctype_utils to use wchar_t where applicable. (#166234)
vonosmas Nov 5, 2025
37fff6e
[NFC][LLVM][IR] Cleanup namespace usage in LLVM IR cpp files (#166477)
jurahul Nov 5, 2025
00171b3
[NFC][TableGen] Adopt CodeGenHelpers in SDNodeInfoEmitter (#165622)
jurahul Nov 5, 2025
28a279c
[lldb-dap] expand tilde in dap executable path (#162635)
da-viper Nov 5, 2025
3d0a367
[libc] Make errno asserts noop on gpu targets (#166606)
mleleszi Nov 5, 2025
e2d2aff
[AMDGPU][LowerBufferFatPointers] Fix crash with `select false` (#166471)
krzysz00 Nov 5, 2025
1041423
[clang][SourceManager] Reuse code when computing Column and Line numb…
SergejSalnikov Nov 5, 2025
db6231b
[AMDGPU][MC] GFX9 - Support NV bit in FLAT instructions in pre-GFX90A…
jwanggit86 Nov 5, 2025
6c4f968
[clang-format] Fix brace wrapping for Java records (#164711)
hannesbraun Nov 5, 2025
0469ff0
TableGen: Split RuntimeLibcallsEmitter into separate utility header (…
arsenm Nov 5, 2025
b0ae054
[BOLT][AArch64] Fix LDR relocation type in ADRP+LDR sequence (#166391)
yozhu Nov 5, 2025
f76c132
[SimplifyCFG] Fix weight calculation for `simplifySwitchOfPowersOfTwo…
mtrofin Nov 5, 2025
78d6491
[InterleavedAccess] Construct interleaved access store with shuffles
ram-NK Nov 5, 2025
1fc5c02
[LVer][profcheck] explicitly set unknown branch weights for the versi…
mtrofin Nov 5, 2025
163933e
[gn build] Port 0469ff0a212d
llvmgnsyncbot Nov 5, 2025
5f1b902
[BOLT][AArch64] Fix printing of relocation types (#166621)
maksfb Nov 5, 2025
5419097
[LV] Add tests for narrowing interleave groups with casts.
fhahn Nov 5, 2025
f80cec2
merge main into amd-staging
ronlieb Nov 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/generate_test_report_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import generate_test_report_lib


def compute_platform_title() -> str:
logo = ":window:" if platform.system() == "Windows" else ":penguin:"
# On Linux the machine value is x86_64 on Windows it is AMD64.
Expand Down
1 change: 1 addition & 0 deletions .ci/generate_test_report_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def _format_ninja_failures(ninja_failures: list[tuple[str, str]]) -> list[str]:
)
return output


def get_failures(junit_objects) -> dict[str, list[tuple[str, str]]]:
failures = {}
for results in junit_objects:
Expand Down
38 changes: 6 additions & 32 deletions bolt/lib/Core/Relocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1018,41 +1018,15 @@ void Relocation::print(raw_ostream &OS) const {
default:
OS << "RType:" << Twine::utohexstr(Type);
break;

case Triple::aarch64: {
static const char *const AArch64RelocNames[] = {
#define ELF_RELOC(name, value) #name,
#include "llvm/BinaryFormat/ELFRelocs/AArch64.def"
#undef ELF_RELOC
};
assert(Type < ArrayRef(AArch64RelocNames).size());
OS << AArch64RelocNames[Type];
} break;

case Triple::aarch64:
OS << object::getELFRelocationTypeName(ELF::EM_AARCH64, Type);
break;
case Triple::riscv64:
// RISC-V relocations are not sequentially numbered so we cannot use an
// array
switch (Type) {
default:
llvm_unreachable("illegal RISC-V relocation");
#define ELF_RELOC(name, value) \
case value: \
OS << #name; \
OS << object::getELFRelocationTypeName(ELF::EM_RISCV, Type);
break;
#include "llvm/BinaryFormat/ELFRelocs/RISCV.def"
#undef ELF_RELOC
}
case Triple::x86_64:
OS << object::getELFRelocationTypeName(ELF::EM_X86_64, Type);
break;

case Triple::x86_64: {
static const char *const X86RelocNames[] = {
#define ELF_RELOC(name, value) #name,
#include "llvm/BinaryFormat/ELFRelocs/x86_64.def"
#undef ELF_RELOC
};
assert(Type < ArrayRef(X86RelocNames).size());
OS << X86RelocNames[Type];
} break;
}
OS << ", 0x" << Twine::utohexstr(Offset);
if (Symbol) {
Expand Down
3 changes: 2 additions & 1 deletion bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,8 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
Insts[1].addOperand(MCOperand::createImm(0));
Insts[1].addOperand(MCOperand::createImm(0));
setOperandToSymbolRef(Insts[1], /* OpNum */ 2, Target, 0, Ctx,
ELF::R_AARCH64_ADD_ABS_LO12_NC);
isLDRXl(LDRInst) ? ELF::R_AARCH64_LDST64_ABS_LO12_NC
: ELF::R_AARCH64_LDST32_ABS_LO12_NC);
return Insts;
}

Expand Down
24 changes: 24 additions & 0 deletions bolt/test/AArch64/relocation-type-print.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Verify that llvm-bolt correctly prints relocation types.

# REQUIRES: system-linux

# RUN: %clang %cflags -nostartfiles %s -o %t.exe -Wl,-q,--no-relax
# RUN: llvm-bolt %t.exe --print-cfg --print-relocations -o %t.bolt \
# RUN: | FileCheck %s

.section .text
.align 4
.globl _start
.type _start, %function
_start:

adrp x0, _start
# CHECK: adrp
# CHECK-SAME: R_AARCH64_ADR_PREL_PG_HI21

add x0, x0, :lo12:_start
# CHECK-NEXT: add
# CHECK-SAME: R_AARCH64_ADD_ABS_LO12_NC

ret
.size _start, .-_start
30 changes: 15 additions & 15 deletions bolt/test/runtime/AArch64/inline-memcpy.s
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@
# CHECK-ASM: bl{{.*}}<memcpy

# Register move should NOT be inlined (size unknown at compile time)
# CHECK-ASM-LABEL: <test_register_move_negative>:
# CHECK-ASM-LABEL: <test_register_move_unknown>:
# CHECK-ASM: bl{{.*}}<memcpy

# CHECK-ASM-LABEL: <test_x2_rewrite_negative>:
# CHECK-ASM-LABEL: <test_x2_rewrite_unknown>:
# CHECK-ASM: bl{{.*}}<memcpy

# Live-in parameter should NOT be inlined (size unknown at compile time)
# CHECK-ASM-LABEL: <test_live_in_negative>:
# CHECK-ASM-LABEL: <test_live_in_unknown>:
# CHECK-ASM: bl{{.*}}<memcpy

# _memcpy8 should be inlined with end-pointer return (dest+size)
Expand Down Expand Up @@ -262,9 +262,9 @@ test_4_byte_add_immediate:
ret
.size test_4_byte_add_immediate, .-test_4_byte_add_immediate

.globl test_register_move_negative
.type test_register_move_negative,@function
test_register_move_negative:
.globl test_register_move_unknown
.type test_register_move_unknown,@function
test_register_move_unknown:
stp x29, x30, [sp, #-32]!
mov x29, sp
add x1, sp, #16
Expand All @@ -274,20 +274,20 @@ test_register_move_negative:
bl memcpy
ldp x29, x30, [sp], #32
ret
.size test_register_move_negative, .-test_register_move_negative
.size test_register_move_unknown, .-test_register_move_unknown

.globl test_x2_rewrite_negative
.type test_x2_rewrite_negative,@function
test_x2_rewrite_negative:
.globl test_x2_rewrite_unknown
.type test_x2_rewrite_unknown,@function
test_x2_rewrite_unknown:
mov x2, #8
ldr x2, [sp, #24]
bl memcpy
ret
.size test_x2_rewrite_negative, .-test_x2_rewrite_negative
.size test_x2_rewrite_unknown, .-test_x2_rewrite_unknown

.globl test_live_in_negative
.type test_live_in_negative,@function
test_live_in_negative:
.globl test_live_in_unknown
.type test_live_in_unknown,@function
test_live_in_unknown:
# x2 comes in as parameter, no instruction sets it (should NOT inline)
stp x29, x30, [sp, #-32]!
mov x29, sp
Expand All @@ -297,7 +297,7 @@ test_live_in_negative:
bl memcpy
ldp x29, x30, [sp], #32
ret
.size test_live_in_negative, .-test_live_in_negative
.size test_live_in_unknown, .-test_live_in_unknown

.globl test_memcpy8_4_byte
.type test_memcpy8_4_byte,@function
Expand Down
6 changes: 3 additions & 3 deletions clang/include/clang/Basic/AttrDocs.td
Original file line number Diff line number Diff line change
Expand Up @@ -3450,9 +3450,9 @@ Mac, and BSD. This attribute has no effect on other targets.
def MSABIDocs : Documentation {
let Category = DocCatCallingConvs;
let Content = [{
On non-Windows x86_64 targets, this attribute changes the calling convention of
a function to match the default convention used on Windows x86_64. This
attribute has no effect on Windows targets or non-x86_64 targets.
On non-Windows x86_64 and aarch64 targets, this attribute changes the calling convention of
a function to match the default convention used on Windows. This
attribute has no effect on Windows targets or non-x86_64, non-aarch64 targets.
}];
}

Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/BuiltinsAMDGPU.def
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ BUILTIN(__builtin_amdgcn_raw_buffer_load_b128, "V4UiQbiiIi", "n")
BUILTIN(__builtin_amdgcn_raw_ptr_buffer_atomic_add_i32, "iiQbiiIi", "")

TARGET_BUILTIN(__builtin_amdgcn_raw_ptr_buffer_atomic_fadd_f32, "ffQbiiIi", "", "atomic-fadd-rtn-insts")
TARGET_BUILTIN(__builtin_amdgcn_raw_ptr_buffer_atomic_fadd_v2f16, "V2hV2hQbiiIi", "t", "atomic-buffer-global-pk-add-f16-insts")
TARGET_BUILTIN(__builtin_amdgcn_raw_ptr_buffer_atomic_fadd_v2f16, "V2hV2hQbiiIi", "", "atomic-buffer-global-pk-add-f16-insts")

TARGET_BUILTIN(__builtin_amdgcn_raw_ptr_buffer_atomic_fmin_f32, "ffQbiiIi", "", "atomic-fmin-fmax-global-f32")
TARGET_BUILTIN(__builtin_amdgcn_raw_ptr_buffer_atomic_fmax_f32, "ffQbiiIi", "", "atomic-fmin-fmax-global-f32")
Expand Down
51 changes: 51 additions & 0 deletions clang/include/clang/Basic/IdentifierTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,57 @@ class LangOptions;
class MultiKeywordSelector;
class SourceLocation;

/// Constants for TokenKinds.def
enum TokenKey : unsigned {
KEYC99 = 0x1,
KEYCXX = 0x2,
KEYCXX11 = 0x4,
KEYGNU = 0x8,
KEYMS = 0x10,
BOOLSUPPORT = 0x20,
KEYALTIVEC = 0x40,
KEYNOCXX = 0x80,
KEYBORLAND = 0x100,
KEYOPENCLC = 0x200,
KEYC23 = 0x400,
KEYNOMS18 = 0x800,
KEYNOOPENCL = 0x1000,
WCHARSUPPORT = 0x2000,
HALFSUPPORT = 0x4000,
CHAR8SUPPORT = 0x8000,
KEYOBJC = 0x10000,
KEYZVECTOR = 0x20000,
KEYCOROUTINES = 0x40000,
KEYMODULES = 0x80000,
KEYCXX20 = 0x100000,
KEYOPENCLCXX = 0x200000,
KEYMSCOMPAT = 0x400000,
KEYSYCL = 0x800000,
KEYCUDA = 0x1000000,
KEYZOS = 0x2000000,
KEYNOZOS = 0x4000000,
KEYHLSL = 0x8000000,
KEYFIXEDPOINT = 0x10000000,
KEYMAX = KEYFIXEDPOINT, // The maximum key
KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
KEYALL = (KEYMAX | (KEYMAX - 1)) & ~KEYNOMS18 & ~KEYNOOPENCL &
~KEYNOZOS // KEYNOMS18, KEYNOOPENCL, KEYNOZOS are excluded.
};

/// How a keyword is treated in the selected standard. This enum is ordered
/// intentionally so that the value that 'wins' is the most 'permissive'.
enum KeywordStatus {
KS_Unknown, // Not yet calculated. Used when figuring out the status.
KS_Disabled, // Disabled
KS_Future, // Is a keyword in future standard
KS_Extension, // Is an extension
KS_Enabled, // Enabled
};

/// Translates flags as specified in TokenKinds.def into keyword status
/// in the given language standard.
KeywordStatus getKeywordStatus(const LangOptions &LangOpts, unsigned Flags);

enum class ReservedIdentifierStatus {
NotReserved = 0,
StartsWithUnderscoreAtGlobalScope,
Expand Down
20 changes: 16 additions & 4 deletions clang/include/clang/Basic/SourceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -1409,10 +1409,15 @@ class SourceManager : public RefCountedBase<SourceManager> {
/// before calling this method.
unsigned getColumnNumber(FileID FID, unsigned FilePos,
bool *Invalid = nullptr) const;
unsigned getColumnNumber(SourceLocation Loc, bool *Invalid = nullptr) const;
unsigned getSpellingColumnNumber(SourceLocation Loc,
bool *Invalid = nullptr) const;
bool *Invalid = nullptr) const {
return getColumnNumber(getSpellingLoc(Loc), Invalid);
}
unsigned getExpansionColumnNumber(SourceLocation Loc,
bool *Invalid = nullptr) const;
bool *Invalid = nullptr) const {
return getColumnNumber(getExpansionLoc(Loc), Invalid);
}
unsigned getPresumedColumnNumber(SourceLocation Loc,
bool *Invalid = nullptr) const;

Expand All @@ -1423,8 +1428,15 @@ class SourceManager : public RefCountedBase<SourceManager> {
/// MemoryBuffer, so this is not cheap: use only when about to emit a
/// diagnostic.
unsigned getLineNumber(FileID FID, unsigned FilePos, bool *Invalid = nullptr) const;
unsigned getSpellingLineNumber(SourceLocation Loc, bool *Invalid = nullptr) const;
unsigned getExpansionLineNumber(SourceLocation Loc, bool *Invalid = nullptr) const;
unsigned getLineNumber(SourceLocation Loc, bool *Invalid = nullptr) const;
unsigned getSpellingLineNumber(SourceLocation Loc,
bool *Invalid = nullptr) const {
return getLineNumber(getSpellingLoc(Loc), Invalid);
}
unsigned getExpansionLineNumber(SourceLocation Loc,
bool *Invalid = nullptr) const {
return getLineNumber(getExpansionLoc(Loc), Invalid);
}
unsigned getPresumedLineNumber(SourceLocation Loc, bool *Invalid = nullptr) const;

/// Return the filename or buffer identifier of the buffer the
Expand Down
55 changes: 1 addition & 54 deletions clang/lib/Basic/IdentifierTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,57 +77,6 @@ IdentifierTable::IdentifierTable(const LangOptions &LangOpts,
// Language Keyword Implementation
//===----------------------------------------------------------------------===//

// Constants for TokenKinds.def
namespace {

enum TokenKey : unsigned {
KEYC99 = 0x1,
KEYCXX = 0x2,
KEYCXX11 = 0x4,
KEYGNU = 0x8,
KEYMS = 0x10,
BOOLSUPPORT = 0x20,
KEYALTIVEC = 0x40,
KEYNOCXX = 0x80,
KEYBORLAND = 0x100,
KEYOPENCLC = 0x200,
KEYC23 = 0x400,
KEYNOMS18 = 0x800,
KEYNOOPENCL = 0x1000,
WCHARSUPPORT = 0x2000,
HALFSUPPORT = 0x4000,
CHAR8SUPPORT = 0x8000,
KEYOBJC = 0x10000,
KEYZVECTOR = 0x20000,
KEYCOROUTINES = 0x40000,
KEYMODULES = 0x80000,
KEYCXX20 = 0x100000,
KEYOPENCLCXX = 0x200000,
KEYMSCOMPAT = 0x400000,
KEYSYCL = 0x800000,
KEYCUDA = 0x1000000,
KEYZOS = 0x2000000,
KEYNOZOS = 0x4000000,
KEYHLSL = 0x8000000,
KEYFIXEDPOINT = 0x10000000,
KEYMAX = KEYFIXEDPOINT, // The maximum key
KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
KEYALL = (KEYMAX | (KEYMAX - 1)) & ~KEYNOMS18 & ~KEYNOOPENCL &
~KEYNOZOS // KEYNOMS18, KEYNOOPENCL, KEYNOZOS are excluded.
};

/// How a keyword is treated in the selected standard. This enum is ordered
/// intentionally so that the value that 'wins' is the most 'permissive'.
enum KeywordStatus {
KS_Unknown, // Not yet calculated. Used when figuring out the status.
KS_Disabled, // Disabled
KS_Future, // Is a keyword in future standard
KS_Extension, // Is an extension
KS_Enabled, // Enabled
};

} // namespace

// This works on a single TokenKey flag and checks the LangOpts to get the
// KeywordStatus based exclusively on this flag, so that it can be merged in
// getKeywordStatus. Most should be enabled/disabled, but some might imply
Expand Down Expand Up @@ -220,9 +169,7 @@ static KeywordStatus getKeywordStatusHelper(const LangOptions &LangOpts,
}
}

/// Translates flags as specified in TokenKinds.def into keyword status
/// in the given language standard.
static KeywordStatus getKeywordStatus(const LangOptions &LangOpts,
KeywordStatus clang::getKeywordStatus(const LangOptions &LangOpts,
unsigned Flags) {
// KEYALL means always enabled, so special case this one.
if (Flags == KEYALL) return KS_Enabled;
Expand Down
27 changes: 8 additions & 19 deletions clang/lib/Basic/SourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1159,17 +1159,11 @@ static bool isInvalid(LocType Loc, bool *Invalid) {
return MyInvalid;
}

unsigned SourceManager::getSpellingColumnNumber(SourceLocation Loc,
bool *Invalid) const {
if (isInvalid(Loc, Invalid)) return 0;
FileIDAndOffset LocInfo = getDecomposedSpellingLoc(Loc);
return getColumnNumber(LocInfo.first, LocInfo.second, Invalid);
}

unsigned SourceManager::getExpansionColumnNumber(SourceLocation Loc,
bool *Invalid) const {
unsigned SourceManager::getColumnNumber(SourceLocation Loc,
bool *Invalid) const {
assert(Loc.isFileID());
if (isInvalid(Loc, Invalid)) return 0;
FileIDAndOffset LocInfo = getDecomposedExpansionLoc(Loc);
FileIDAndOffset LocInfo = getDecomposedLoc(Loc);
return getColumnNumber(LocInfo.first, LocInfo.second, Invalid);
}

Expand Down Expand Up @@ -1367,18 +1361,13 @@ unsigned SourceManager::getLineNumber(FileID FID, unsigned FilePos,
return LineNo;
}

unsigned SourceManager::getSpellingLineNumber(SourceLocation Loc,
bool *Invalid) const {
if (isInvalid(Loc, Invalid)) return 0;
FileIDAndOffset LocInfo = getDecomposedSpellingLoc(Loc);
return getLineNumber(LocInfo.first, LocInfo.second);
}
unsigned SourceManager::getExpansionLineNumber(SourceLocation Loc,
bool *Invalid) const {
unsigned SourceManager::getLineNumber(SourceLocation Loc, bool *Invalid) const {
assert(Loc.isFileID());
if (isInvalid(Loc, Invalid)) return 0;
FileIDAndOffset LocInfo = getDecomposedExpansionLoc(Loc);
FileIDAndOffset LocInfo = getDecomposedLoc(Loc);
return getLineNumber(LocInfo.first, LocInfo.second);
}

unsigned SourceManager::getPresumedLineNumber(SourceLocation Loc,
bool *Invalid) const {
PresumedLoc PLoc = getPresumedLoc(Loc);
Expand Down
Loading