// Copyright (c) 2025 Huawei Technologies Co., Ltd.
// This program is free software, you can redistribute it and/or modify it under the terms and conditions of
// CANN Open Software License Agreement Version 2.0 (the "License").
// Please refer to the License for details. You may not use this file except in compliance with the License.
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
// See LICENSE in the root of the software repository for the full text of the License.
// RUN: ascir-translate -mlir-to-ascendc %s | FileCheck %s
module {
// CHECK: #include "my_lib/my_header.h"
// CHECK-NEXT: #include <cstdint>
emitc.include "my_lib/my_header.h"
emitc.include <"cstdint">
}
// CHECK-LABEL: void emit_constant() {
// CHECK-NEXT: constexpr int32_t v1 = ::AscendC::TOTAL_L1_SIZE;
// CHECK-NEXT: return;
// CHECK-NEXT:}
func.func @emit_constant() {
%0 = "emitc.constant"() {value = #emitc.opaque<"::AscendC::TOTAL_L1_SIZE">} : () -> i32
return
}