Revert "[build][torque] remove workarounds for clang bug"

This reverts commit c5154eeada.

Reason for revert: Broke ASAN bot

Original change's description:
> [build][torque] remove workarounds for clang bug
> 
> Now that https://bugs.llvm.org/show_bug.cgi?id=40118 has been fixed and
> rolled into V8, we can remove the workarounds for this Clang bug.
> 
> This also effectively reverts
> https://chromium-review.googlesource.com/c/v8/v8/+/1280222
> 
> Bug: chromium:893437
> Change-Id: Ia0d6d8ebdafafbc380b1b7a7809ef16effe50d71
> Reviewed-on: https://chromium-review.googlesource.com/c/1425519
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58987}

TBR=jarin@chromium.org,tebbi@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:893437 chromium:924534
Change-Id: Idfc266c11e3413334a12694dd573bdecf5427890
Reviewed-on: https://chromium-review.googlesource.com/c/1430067
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59039}
This commit is contained in:
Tobias Tebbi 2019-01-23 15:17:35 +00:00 committed by Commit Bot
parent ed3738975b
commit 42b50b7805
2 changed files with 22 additions and 6 deletions

View File

@ -3049,6 +3049,9 @@ v8_source_set("torque_base") {
]
configs = [ ":internal_config" ]
if (is_win && is_asan) {
remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ]
}
}
v8_component("v8_libbase") {
@ -3412,6 +3415,9 @@ if (current_toolchain == v8_snapshot_toolchain) {
]
configs = [ ":internal_config" ]
if (is_win && is_asan) {
remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ]
}
}
}

View File

@ -207,7 +207,10 @@ struct LoadObjectFieldInstruction : InstructionBase {
TORQUE_INSTRUCTION_BOILERPLATE()
LoadObjectFieldInstruction(const ClassType* class_type,
std::string field_name)
: class_type(class_type), field_name(std::move(field_name)) {}
: class_type(class_type) {
// The normal way to write this triggers a bug in Clang on Windows.
this->field_name = std::move(field_name);
}
const ClassType* class_type;
std::string field_name;
};
@ -216,7 +219,10 @@ struct StoreObjectFieldInstruction : InstructionBase {
TORQUE_INSTRUCTION_BOILERPLATE()
StoreObjectFieldInstruction(const ClassType* class_type,
std::string field_name)
: class_type(class_type), field_name(std::move(field_name)) {}
: class_type(class_type) {
// The normal way to write this triggers a bug in Clang on Windows.
this->field_name = std::move(field_name);
}
const ClassType* class_type;
std::string field_name;
};
@ -389,8 +395,10 @@ struct ReturnInstruction : InstructionBase {
struct PrintConstantStringInstruction : InstructionBase {
TORQUE_INSTRUCTION_BOILERPLATE()
explicit PrintConstantStringInstruction(std::string message)
: message(std::move(message)) {}
explicit PrintConstantStringInstruction(std::string message) {
// The normal way to write this triggers a bug in Clang on Windows.
this->message = std::move(message);
}
std::string message;
};
@ -399,8 +407,10 @@ struct AbortInstruction : InstructionBase {
TORQUE_INSTRUCTION_BOILERPLATE()
enum class Kind { kDebugBreak, kUnreachable, kAssertionFailure };
bool IsBlockTerminator() const override { return kind != Kind::kDebugBreak; }
explicit AbortInstruction(Kind kind, std::string message = "")
: kind(kind), message(std::move(message)) {}
explicit AbortInstruction(Kind kind, std::string message = "") : kind(kind) {
// The normal way to write this triggers a bug in Clang on Windows.
this->message = std::move(message);
}
Kind kind;
std::string message;