Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from llvm:master #47

Merged
merged 9 commits into from
Aug 29, 2019
25 changes: 12 additions & 13 deletions clang/unittests/CodeGen/IRMatchers.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ class MTupleMatcher : public EntityMatcher<Metadata> {

// Helper function used to construct matchers.

std::shared_ptr<Matcher> MSameAs(unsigned N) {
inline std::shared_ptr<Matcher> MSameAs(unsigned N) {
return std::shared_ptr<Matcher>(new SameAsMatcher(N));
}

Expand All @@ -367,36 +367,35 @@ std::shared_ptr<InstructionMatcher> MInstruction(unsigned C, T... Args) {
return std::shared_ptr<InstructionMatcher>(Result);
}

std::shared_ptr<Matcher> MConstInt(uint64_t V, unsigned W = 0) {
inline std::shared_ptr<Matcher> MConstInt(uint64_t V, unsigned W = 0) {
return std::shared_ptr<Matcher>(new ConstantIntMatcher(V, W));
}

std::shared_ptr<EntityMatcher<Value>>
MValType(std::shared_ptr<EntityMatcher<Type>> T) {
inline std::shared_ptr<EntityMatcher<Value>>
MValType(std::shared_ptr<EntityMatcher<Type>> T) {
return std::shared_ptr<EntityMatcher<Value>>(new ValueTypeMatcher(T));
}

std::shared_ptr<EntityMatcher<Value>> MValType(const Type *T) {
inline std::shared_ptr<EntityMatcher<Value>> MValType(const Type *T) {
return std::shared_ptr<EntityMatcher<Value>>(new ValueTypeMatcher(T));
}

std::shared_ptr<EntityMatcher<Type>>
inline std::shared_ptr<EntityMatcher<Type>>
MType(std::function<bool(const Type &)> C) {
return std::shared_ptr<EntityMatcher<Type>>(new CondMatcher<Type>(C));
}

std::shared_ptr<EntityMatcher<Metadata>> MMAny() {
inline std::shared_ptr<EntityMatcher<Metadata>> MMAny() {
return std::shared_ptr<EntityMatcher<Metadata>>(new AnyMatcher<Metadata>);
}

std::shared_ptr<EntityMatcher<Metadata>>
inline std::shared_ptr<EntityMatcher<Metadata>>
MMSave(const Metadata *&V, std::shared_ptr<EntityMatcher<Metadata>> M) {
return std::shared_ptr<EntityMatcher<Metadata>>(
new SavingMatcher<Metadata>(V, M));
}

std::shared_ptr<EntityMatcher<Metadata>>
MMString(const char *Name) {
inline std::shared_ptr<EntityMatcher<Metadata>> MMString(const char *Name) {
return std::shared_ptr<EntityMatcher<Metadata>>(new NameMetaMatcher(Name));
}

Expand All @@ -413,7 +412,8 @@ std::shared_ptr<EntityMatcher<Metadata>> MMTuple(T... Args) {
/// \returns Pointer to the found instruction or nullptr if such instruction
/// was not found.
///
const Instruction *match(const BasicBlock *BB, std::shared_ptr<Matcher> M) {
inline const Instruction *match(const BasicBlock *BB,
std::shared_ptr<Matcher> M) {
MatcherContext MC;
for (const auto &I : *BB) {
MC.push(&I);
Expand All @@ -425,13 +425,12 @@ const Instruction *match(const BasicBlock *BB, std::shared_ptr<Matcher> M) {
return nullptr;
}


/// Looks for the instruction that satisfies condition of the specified
/// matcher starting from the specified instruction inside the same basic block.
///
/// The given instruction is not checked.
///
const Instruction *matchNext(const Instruction *I, std::shared_ptr<Matcher> M) {
inline const Instruction *matchNext(const Instruction *I, std::shared_ptr<Matcher> M) {
if (!I)
return nullptr;
MatcherContext MC;
Expand Down
78 changes: 0 additions & 78 deletions lldb/packages/Python/lldbsuite/test/dotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,6 @@ def usage(parser):

$ ./dotest.py --log-success

Option 2: (DEPRECATED)

The following options can only enable logs from the host lldb process.
Only categories from the "lldb" or "gdb-remote" channels can be enabled
They also do not automatically enable logs in locally running debug servers.
Also, logs from all test case are written into each log file

o LLDB_LOG: if defined, specifies the log file pathname for the 'lldb' subsystem
with a default option of 'event process' if LLDB_LOG_OPTION is not defined.

o GDB_REMOTE_LOG: if defined, specifies the log file pathname for the
'process.gdb-remote' subsystem with a default option of 'packets' if
GDB_REMOTE_LOG_OPTION is not defined.

""")
sys.exit(0)

Expand Down Expand Up @@ -416,12 +402,6 @@ def parseOptionsAndInitTestdirs():
if do_help:
usage(parser)

# Capture test results-related args.
if args.curses:
# Act as if the following args were set.
args.results_formatter = "lldbsuite.test_event.formatter.curses.Curses"
args.results_file = "stdout"

if args.results_file:
configuration.results_filename = args.results_file

Expand Down Expand Up @@ -772,61 +752,6 @@ def disabledynamics():
raise Exception('disabling dynamic type support failed')


def lldbLoggings():
import lldb
"""Check and do lldb loggings if necessary."""

# Turn on logging for debugging purposes if ${LLDB_LOG} environment variable is
# defined. Use ${LLDB_LOG} to specify the log file.
ci = lldb.DBG.GetCommandInterpreter()
res = lldb.SBCommandReturnObject()
if ("LLDB_LOG" in os.environ):
open(os.environ["LLDB_LOG"], 'w').close()
if ("LLDB_LOG_OPTION" in os.environ):
lldb_log_option = os.environ["LLDB_LOG_OPTION"]
else:
lldb_log_option = "event process expr state api"
ci.HandleCommand(
"log enable -n -f " +
os.environ["LLDB_LOG"] +
" lldb " +
lldb_log_option,
res)
if not res.Succeeded():
raise Exception('log enable failed (check LLDB_LOG env variable)')

if ("LLDB_LINUX_LOG" in os.environ):
open(os.environ["LLDB_LINUX_LOG"], 'w').close()
if ("LLDB_LINUX_LOG_OPTION" in os.environ):
lldb_log_option = os.environ["LLDB_LINUX_LOG_OPTION"]
else:
lldb_log_option = "event process expr state api"
ci.HandleCommand(
"log enable -n -f " +
os.environ["LLDB_LINUX_LOG"] +
" linux " +
lldb_log_option,
res)
if not res.Succeeded():
raise Exception(
'log enable failed (check LLDB_LINUX_LOG env variable)')

# Ditto for gdb-remote logging if ${GDB_REMOTE_LOG} environment variable is defined.
# Use ${GDB_REMOTE_LOG} to specify the log file.
if ("GDB_REMOTE_LOG" in os.environ):
if ("GDB_REMOTE_LOG_OPTION" in os.environ):
gdb_remote_log_option = os.environ["GDB_REMOTE_LOG_OPTION"]
else:
gdb_remote_log_option = "packets process"
ci.HandleCommand(
"log enable -n -f " + os.environ["GDB_REMOTE_LOG"] + " gdb-remote "
+ gdb_remote_log_option,
res)
if not res.Succeeded():
raise Exception(
'log enable failed (check GDB_REMOTE_LOG env variable)')


# ======================================== #
# #
# Execution of the test driver starts here #
Expand Down Expand Up @@ -1097,9 +1022,6 @@ def run_suite():
# Now that we have loaded all the test cases, run the whole test suite.
#

# Turn on lldb loggings if necessary.
lldbLoggings()

# Disable default dynamic types for testing purposes
disabledynamics()

Expand Down
4 changes: 0 additions & 4 deletions lldb/packages/Python/lldbsuite/test/dotest_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@ def create_parser():

# Test results support.
group = parser.add_argument_group('Test results options')
group.add_argument(
'--curses',
action='store_true',
help='Shortcut for specifying test results using the curses formatter')
group.add_argument(
'--results-file',
action='store',
Expand Down
Loading