LLVM module attributes question

I’m trying to find a way to get/set the module attributes as printed in a module dump:

attributes #0 = { noinline nounwind uwtable “correctly-rounded-divide-sqrt-fp-math”=“false” “disable-tail-calls”=“false” “less-precise-fpmad”=“false” “no-frame-pointer-elim”=“true” “no-frame-pointer-elim-non-leaf” “no-infs-fp-math”=“false” “no-jump-tables”=“false” “no-nans-fp-math”=“false” “no-signed-zeros-fp-math”=“false” “no-trapping-math”=“false” “stack-protector-buffer-size”=“8” “target-cpu”=“x86-64” “target-features”="+fxsr,+mmx,+sse,+sse2,+x87" “unsafe-fp-math”=“false” “use-soft-float”=“false” }

Am I correct in assuming these are actually called flags, and they’re accessed using Module::getModuleFlag() and Module::addModuleFlag()?

Toshi

I think getModuleFlag do not return these attributes.

These are function attributes that are returned by Function::getAttributes()

Ahhh, thanks!

Toshi