Skip to content

Commit cb973e3

Browse files
committed
Add comment for metadata flags.
1 parent 08cf2c3 commit cb973e3

File tree

1 file changed

+2
-0
lines changed
  • source/compiler/qsc_codegen/src

1 file changed

+2
-0
lines changed

source/compiler/qsc_codegen/src/qir.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ fn get_module_metadata(program: &rir::Program) -> String {
748748
for cap in program.config.capabilities.iter() {
749749
match cap {
750750
TargetCapabilityFlags::IntegerComputations => {
751+
// Use `5` as the flag to signify "Append" mode. See https://llvm.org/docs/LangRef.html#module-flags-metadata
751752
writeln!(
752753
flags,
753754
"!{index} = !{{i32 5, !\"int_computations\", !{{!\"i64\"}}}}",
@@ -756,6 +757,7 @@ fn get_module_metadata(program: &rir::Program) -> String {
756757
index += 1;
757758
}
758759
TargetCapabilityFlags::FloatingPointComputations => {
760+
// Use `5` as the flag to signify "Append" mode. See https://llvm.org/docs/LangRef.html#module-flags-metadata
759761
writeln!(
760762
flags,
761763
"!{index} = !{{i32 5, !\"float_computations\", !{{!\"f64\"}}}}",

0 commit comments

Comments
 (0)