| 622 | } |
| 623 | |
| 624 | llvm::Value* CodegenAnyVal::GetUnloweredPtr(const string& name) const { |
| 625 | // Get an unlowered pointer by creating a lowered pointer then bitcasting it. |
| 626 | // TODO: if the original value was unlowered, this generates roundabout code that |
| 627 | // lowers the value and casts it back. Generally LLVM's optimiser can reason |
| 628 | // about what's going on and undo our shenanigans to generate sane code, but it |
| 629 | // would be nice to just emit reasonable code in the first place. |
| 630 | return builder_->CreateBitCast( |
| 631 | GetLoweredPtr(), GetUnloweredPtrType(codegen_, type_), name); |
| 632 | } |
| 633 | |
| 634 | llvm::Value* CodegenAnyVal::GetAnyValPtr(const std::string& name) const { |
| 635 | return builder_->CreateBitCast( |
no outgoing calls
no test coverage detected