Skip to content

Instantly share code, notes, and snippets.

View yamaguchi1024's full-sized avatar
🐈

Yuka Ikarashi yamaguchi1024

🐈
View GitHub Profile
@yamaguchi1024
yamaguchi1024 / GlobalModulesIndex.md
Last active March 20, 2019 15:40
Introduction to GlobalModulesIndex project at HSF group

Thank you for the interest in GlobalModulesIndex project at HSF group! As this project is highly technical, it is necessary to have some understanding of ROOT and Clang before starting to write proposal. This document is dedicated to give a surface introduction of C++ modules, and to give a project which you can try out.

Build ROOT with C++ Modules

git clone https://github.com/root-project/root
mkdir root-build
cd root-build
cmake ../root -Druntime_cxxmodules=On -Droot7=Off (-GNinja)
make (or ninja)
diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx
index eee35d1365..2f6eaba68f 100644
--- a/core/metacling/src/TCling.cxx
+++ b/core/metacling/src/TCling.cxx
@@ -5875,49 +5875,21 @@ static void* LazyFunctionCreatorAutoloadForModule(const std::string& mangled_nam
R__LOCKGUARD(gInterpreterMutex);
- static constexpr std::hash<std::string> hash_fn;
- // size_t is a hashed mangled_name and libs[(uint16_t)hashToLibNameIndex.second] = library's
import os
import sys
import subprocess
import re
args = sys.argv
directory = args[1]
if not directory.endswith("/"):
directory += "/"
files = os.listdir(directory)
diff --git a/roofit/roofitcore/src/RooCintUtils.cxx b/roofit/roofitcore/src/RooCintUtils.cxx
index 314aabfbec..829654dc2e 100644
--- a/roofit/roofitcore/src/RooCintUtils.cxx
+++ b/roofit/roofitcore/src/RooCintUtils.cxx
@@ -25,6 +25,7 @@
#include "RooMsgService.h"
#include "TInterpreter.h"
+#include "TEnum.h"
I suggest to implement the value completion which flags are handled in clang Driver.
Some flags pass the value string directly to further process, which is too hard to chase and few people would use those flag.
Eg. "clang foo.a -Wa,--foobar -o foo" will execute "as --foobar -o foo", and Driver has no information about --foobar.
I've researched flags which take a value as an argument.
As you can see, there are some flags which includes .def files, and I think it's reasonable to merge its information to Options.td using tablegen.
Many of "No fixed value" flags were passing value "foobar" as string to further process or using it as a string.
diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td
index 3833f0f..106392f 100644
--- a/clang/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td
@@ -127,7 +127,7 @@ def warn_drv_yc_multiple_inputs_clang_cl : Warning<
"support for '/Yc' with more than one source file not implemented yet; flag ignored">,
InGroup<ClangClPch>;
-def err_drv_invalid_value : Error<"invalid value '%1' in '%0'">;
+def err_drv_invalid_value : Error<"invalid value '%1' in '%0'. Did you mean '%2'?">;
# Please add "source /path/to/bash-autocomplete.sh" to your .bashrc to use this.
_clang()
{
local cur prev words cword arg
_init_completion -n : || return
local w1="${COMP_WORDS[$cword - 1]}"
local w2="${COMP_WORDS[$cword - 2]}"
if [[ "$cur" == -* ]]; then
# -foo<tab>
static bool optionMatches(const OptTable::Info &In, std::string C) {
if (!In.ArgValues || !In.Prefixes)
return true;
for (size_t I = 0; In.Prefixes[I]; I++)
if (C == std::string(In.Prefixes[I]) + In.Name)
return false;
return true;
}
I suggest to implement the value completion which flags are handled in clang Driver.
Some flags pass the value string directly to further process, which is too hard to chase and few people would use those flag.
Eg. "clang foo.a -Wa,--foobar -o foo" will execute "as --foobar -o foo", and Driver has no information about --foobar.
I've researched flags which take a value as an argument.
As you can see, there are some flags which includes .def files, and I think it's reasonable to merge its information to Options.td using tablegen.
Many of "No fixed value" flags were passing value "foobar" as string to further process or using it as a string.
I suggest to implement the value completion which flags are handled in clang Driver.
Some flags pass the value string directly to further process, which is too hard to chase and few people would use those flag.
Eg. "clang foo.a -Wa,--foobar -o foo" will execute "as --foobar -o foo", and Driver has no information about --foobar.
I've researched flags which take a value as an argument.
As you can see, there are some flags which includes .def files, and I think it's reasonable to merge its information to Options.td using tablegen.
Many of "No fixed value" flags were passing value "foobar" as string to further process or using it as a string.