| 262 | } |
| 263 | |
| 264 | hiprtcResult hiprtcGetBitcode(hiprtcProgram prog, char* bitcode) { |
| 265 | HIPRTC_INIT_API(prog, bitcode); |
| 266 | |
| 267 | if (bitcode == nullptr) { |
| 268 | HIPRTC_RETURN(HIPRTC_ERROR_INVALID_INPUT); |
| 269 | } |
| 270 | |
| 271 | auto* rtcProgram = hiprtc::RTCCompileProgram::as_RTCCompileProgram(prog); |
| 272 | if (!rtcProgram->GetBitcode(bitcode)) { |
| 273 | HIPRTC_RETURN(HIPRTC_ERROR_INVALID_PROGRAM); |
| 274 | } |
| 275 | |
| 276 | HIPRTC_RETURN(HIPRTC_SUCCESS); |
| 277 | } |
| 278 | |
| 279 | hiprtcResult hiprtcGetBitcodeSize(hiprtcProgram prog, size_t* bitcode_size) { |
| 280 | HIPRTC_INIT_API(prog, bitcode_size); |
nothing calls this directly
no test coverage detected