@@ -0,0 +1,41 @@
+#ifdef LIBC_COPT_PRINTF_MODULAR
petrhosek wrote:
This file needs the copyright header.
https://github.com/llvm/llvm-project/pull/147426
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.l
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/143209
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,26 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: clang-doc --output=%t --format=json --executor=standalone %s
+// RUN: FileCheck %s < %t/GlobalNamespace/index.json
+
+static void myFunction() {}
+
+void noExceptFunction() noexcept {}
+
+inline void inlineFunction() {}
+
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/138066
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/138067
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/138064
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
petrhosek wrote:
Here's an idea that doesn't need to be addressed in this PR.
We already have the YAML backend for Clang-doc which is primarily used for
testing and also to allow external backends. We chose YAML because back when we
started working on it, there was no JSON support in LLVM, but
@@ -86,8 +87,16 @@ TEST(HTMLMustacheGeneratorTest, generateDocs) {
assert(G && "Could not find HTMLMustacheGenerator");
ClangDocContext CDCtx = getClangDocContext();
- StringRef RootDir = "";
- EXPECT_THAT_ERROR(G->generateDocs(RootDir, {}, CDCtx), Succeeded())
+ unitte
@@ -57,18 +57,118 @@ class MustacheTemplateFile : public Template {
MustacheTemplateFile(StringRef TemplateStr) : Template(TemplateStr) {}
};
+static std::unique_ptr NamespaceTemplate = nullptr;
+
+static std::unique_ptr RecordTemplate = nullptr;
+
+static Error setupTemplat
@@ -57,18 +57,118 @@ class MustacheTemplateFile : public Template {
MustacheTemplateFile(StringRef TemplateStr) : Template(TemplateStr) {}
};
+static std::unique_ptr NamespaceTemplate = nullptr;
+
+static std::unique_ptr RecordTemplate = nullptr;
+
+static Error setupTemplat
@@ -406,8 +406,26 @@ static json::Value extractValue(const RecordInfo &I,
static Error setupTemplateValue(const ClangDocContext &CDCtx, json::Value &V,
Info *I) {
- return createStringError(inconvertibleErrorCode(),
-
@@ -362,6 +362,9 @@ struct FunctionInfo : public SymbolInfo {
// specializations.
SmallString<16> FullName;
+ // Function Prototype
+ SmallString<256> ProtoType;
petrhosek wrote:
This capitalization might imply that this is a type of proto(type), we als
@@ -710,11 +897,12 @@ emitInfo(const RecordDecl *D, const FullComment *FC,
Location Loc,
// What this is a specialization of.
auto SpecOf = CTSD->getSpecializedTemplateOrPartial();
-if (auto *CTD = dyn_cast(SpecOf))
- Specialization.SpecializationOf = getUSRF
@@ -710,11 +897,12 @@ emitInfo(const RecordDecl *D, const FullComment *FC,
Location Loc,
// What this is a specialization of.
auto SpecOf = CTSD->getSpecializedTemplateOrPartial();
-if (auto *CTD = dyn_cast(SpecOf))
- Specialization.SpecializationOf = getUSRF
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/134442
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -534,8 +534,18 @@ void baremetal::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
CmdArgs.push_back("-Bstatic");
- if (TC.getTriple().isRISCV() && Args.hasArg(options::OPT_mno_relax))
-CmdArgs.push_back("--no-relax");
+ if (Triple.isRISCV()) {
+CmdAr
@@ -534,8 +534,14 @@ void baremetal::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
CmdArgs.push_back("-Bstatic");
- if (TC.getTriple().isRISCV() && Args.hasArg(options::OPT_mno_relax))
-CmdArgs.push_back("--no-relax");
+ if (Triple.isRISCV()) {
+if (A
@@ -534,8 +534,14 @@ void baremetal::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
CmdArgs.push_back("-Bstatic");
- if (TC.getTriple().isRISCV() && Args.hasArg(options::OPT_mno_relax))
-CmdArgs.push_back("--no-relax");
+ if (Triple.isRISCV()) {
+if (A
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/121830
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/135457
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -729,6 +729,62 @@ emitInfo(const RecordDecl *D, const FullComment *FC, int
LineNumber,
return {std::move(I), std::move(Parent)};
}
+std::pair, std::unique_ptr>
+emitInfo(const VarDecl *D, const FullComment *FC, int LineNumber,
+ llvm::StringRef File, bool IsFileI
@@ -545,9 +545,27 @@ void baremetal::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
CmdArgs.push_back(Arch == llvm::Triple::aarch64_be ? "-EB" : "-EL");
}
- if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles,
- options::OPT_r
@@ -545,9 +545,27 @@ void baremetal::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
CmdArgs.push_back(Arch == llvm::Triple::aarch64_be ? "-EB" : "-EL");
}
- if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles,
- options::OPT_r
@@ -545,9 +545,27 @@ void baremetal::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
CmdArgs.push_back(Arch == llvm::Triple::aarch64_be ? "-EB" : "-EL");
}
- if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles,
- options::OPT_r
@@ -54,12 +54,11 @@ class LLVM_LIBRARY_VISIBILITY BareMetal : public
Generic_ELF {
return UnwindTableLevel::None;
}
- RuntimeLibType GetDefaultRuntimeLibType() const override {
-return ToolChain::RLT_CompilerRT;
- }
- CXXStdlibType GetDefaultCXXStdlibType() const
@@ -336,6 +336,26 @@ BareMetal::OrderedMultilibs
BareMetal::getOrderedMultilibs() const {
return llvm::reverse(Default);
}
+ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const {
+ if (getTriple().isRISCV() && GCCInstallation.isValid())
+return ToolChain
@@ -534,8 +554,14 @@ void baremetal::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
CmdArgs.push_back("-Bstatic");
- if (TC.getTriple().isRISCV() && Args.hasArg(options::OPT_mno_relax))
-CmdArgs.push_back("--no-relax");
+ if (Triple.isRISCV()) {
+if (A
@@ -336,6 +336,26 @@ BareMetal::OrderedMultilibs
BareMetal::getOrderedMultilibs() const {
return llvm::reverse(Default);
}
+ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const {
+ if (getTriple().isRISCV() && GCCInstallation.isValid())
+return ToolChain
@@ -336,6 +336,26 @@ BareMetal::OrderedMultilibs
BareMetal::getOrderedMultilibs() const {
return llvm::reverse(Default);
}
+ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const {
+ if (getTriple().isRISCV() && GCCInstallation.isValid())
+return ToolChain
@@ -336,6 +336,26 @@ BareMetal::OrderedMultilibs
BareMetal::getOrderedMultilibs() const {
return llvm::reverse(Default);
}
+ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const {
+ if (getTriple().isRISCV() && GCCInstallation.isValid())
petr
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/132808
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -16,7 +16,7 @@
// C-AARCH64-BAREMETAL: "-cc1" "-triple" "aarch64-unknown-none-elf"
// C-AARCH64-BAREMETAL: "-isysroot"
"{{.*}}Inputs/basic_aarch64_gcc_tree/aarch64-none-elf"
// C-AARCH64-BAREMETAL: "-internal-isystem"
"{{.*}}Inputs/basic_aarch64_gcc_tree/aarch64-none-elf/i
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/132807
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -565,26 +637,16 @@ void baremetal::Linker::ConstructJob(Compilation &C,
const JobAction &JA,
}
if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
+CmdArgs.push_back("--start-group");
AddRunTimeLibs(TC, D, CmdArgs, Args);
-
CmdArgs.push
petrhosek wrote:
I asked for various parts of the linker setup to be moved into a separate PR. I
understand that each of those changes would cause some churn in tests, but I
think that's desirable so we understand the effect of each of those changes in
isolation.
https://github.com/llvm/llvm-
https://github.com/petrhosek updated
https://github.com/llvm/llvm-project/pull/126960
>From 87587f925442d6369a7d511426a55ad50f3141ea Mon Sep 17 00:00:00 2001
From: Petr Hosek
Date: Wed, 12 Feb 2025 11:37:07 -0800
Subject: [PATCH] [libc] Move __LLVM_LIBC__ define to __llvm-libc-common.h
(#12687
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/122566
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -494,18 +494,31 @@ genReferencesBlock(const std::vector
&References,
static std::unique_ptr
writeFileDefinition(const Location &L,
std::optional RepositoryUrl = std::nullopt) {
- if (!L.IsFileInRootDir || !RepositoryUrl)
+ if (!L.IsFileInRootDir && !Re
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/120308
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/120309
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/119815
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/119814
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -75,3 +89,8 @@ void function(bool x) {}
// YAML-NEXT: - Contents:'0'
// YAML-NEXT: ...
+// MD: ### function
+// MD: *void function(_Bool x)*
+// MD: *Defined at {{.*}}templates.cpp#[[# @LINE - 27]]*
+
+
petrhosek wrote:
Nit: These extra e
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/119813
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/119811
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,226 @@
+#===-- CMakeLists.txt
--===#
+#
+# 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-
https://github.com/petrhosek edited
https://github.com/llvm/llvm-project/pull/110217
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,226 @@
+#===-- CMakeLists.txt
--===#
+#
+# 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-
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/119051
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -1629,6 +1629,10 @@
PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO,
MPM.addPass(buildLTOPreLinkDefaultPipeline(Level));
MPM.addPass(EmbedBitcodePass(ThinLTO, EmitSummary));
+ // If we're doing FatLTO w/ CFI enabled, we don't want the t
petrhosek wrote:
I agree, while the risk is low, this issue has existed for several releases so
it should fine do delay the fix a bit further.
https://github.com/llvm/llvm-project/pull/107362
___
llvm-branch-commits mailing list
llvm-branch-commits@li
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/106518
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,7 @@
+set(MLIR_MAIN_SRC_DIR ${LLVM_MAIN_SRC_DIR}/../mlir/include ) # --src-root
+set(MLIR_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/../mlir/include ) # --includedir
+set(MLIR_TABLEGEN_OUTPUT_DIR ${CMAKE_BINARY_DIR}/tools/mlir/include)
+include_directories(SYSTEM ${MLIR_INCLUDE_D
@@ -0,0 +1,7 @@
+set(MLIR_MAIN_SRC_DIR ${LLVM_MAIN_SRC_DIR}/../mlir/include ) # --src-root
petrhosek wrote:
This variable seems unused and has the same value as `MLIR_INCLUDE_DIR` below,
what's the use case for this variable?
https://github.com/llvm/llvm-projec
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/85709
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
petrhosek wrote:
> @petrhosek What do you think about merging this PR to the release branch?
LGTM
https://github.com/llvm/llvm-project/pull/81402
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
@@ -275,3 +275,7 @@ COMMON_FLAG(bool, test_only_emulate_no_memorymap, false,
// program.
COMMON_FLAG(bool, test_only_replace_dlopen_main_program, false,
"TEST ONLY replace dlopen(,...) with dlopen(NULL)")
+
+COMMON_FLAG(bool, enable_symbolizer_markup, SANITIZER_FUCH
Author: Petr Hosek
Date: 2021-01-21T15:27:34-08:00
New Revision: b0143352634ba7ed29f1db6ea576c0abfd0b4a29
URL:
https://github.com/llvm/llvm-project/commit/b0143352634ba7ed29f1db6ea576c0abfd0b4a29
DIFF:
https://github.com/llvm/llvm-project/commit/b0143352634ba7ed29f1db6ea576c0abfd0b4a29.diff
LO
Author: Petr Hosek
Date: 2021-01-04T14:24:46-08:00
New Revision: f67d3dbdb930eaf92668b47696e51ef0b2c3c3a5
URL:
https://github.com/llvm/llvm-project/commit/f67d3dbdb930eaf92668b47696e51ef0b2c3c3a5
DIFF:
https://github.com/llvm/llvm-project/commit/f67d3dbdb930eaf92668b47696e51ef0b2c3c3a5.diff
LO
Author: Petr Hosek
Date: 2020-07-06T11:38:27-07:00
New Revision: f32ff0807e9e04e727f98804e6aff6c2353b4d73
URL:
https://github.com/llvm/llvm-project/commit/f32ff0807e9e04e727f98804e6aff6c2353b4d73
DIFF:
https://github.com/llvm/llvm-project/commit/f32ff0807e9e04e727f98804e6aff6c2353b4d73.diff
LO
60 matches
Mail list logo